Created
May 6, 2013 20:08
-
-
Save ryanlfoster/5527765 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
extended javascript for | |
Adobe Indesign 5.5 | |
by | |
PDXIII | |
http://about.me/PDXIII | |
originally by fabiantheblind | |
https:github.com/fabiantheblind | |
*/ | |
function loadJSONObject(filepath){ | |
var myJSONfile = File(filepath); | |
if(myJSONfile != false){ | |
myJSONfile.open('r'); | |
myJSONObject = eval("{" + myJSONfile.read() + "}"); | |
myJSONfile.close(); // always close files after reading | |
return myJSONObject; | |
} | |
else{ | |
alert("Bah!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment