Question
i can't write json file in PS
var docRef = app.activeDocument;
function createJSON(object){
var jsonFile= File("~/Desktop/test.json");
jsonFile.open("w");
jsonFile.write(JSON.stringify(object)); /////// the script has there stopped
jsonFile.close();
}
var obj = {
image_Name: docRef.name,
image_layer: docRef.layers.length,
image_W:docRef.width,
image_H:docRef.height
};
createJSON (obj);
//photoshop 2014
anybody can help me?
advance thanks...