Hi!
The provided photoshop script did not save the .json file unless I changed it to the following:
if (saveJSON) {
// Write file.
var file = new File(dir + name + ".json");
//file.remove();
//file.open("a");
file.open("w", "TEXT");
file.lineFeed = "\n";
file.write(json);
file.close();
}
The "w" resets/overwrites the current file if it exists (at least on win7)