You can check out a sample code at the following link
https://community.adobe.com/t5/premiere-pro-discussions/how-to-read-json-file-in-premiere-cep-extension/m-p/10647827#M229987
Change you input file to a JSON like the following
{
"paraStname":"mypar",
"charStname":"title1",
"tabStname":"mytab",
"footerStname":"footer",
"objStaname":"mypic"
}
After executing the script you can access myPic with the code
contentObj.objStaname
-Manan
@Manan Joshi @rob day
Suddenly it worked ......
Thank you good people great good people.
I would like to ask:
alert(objStn); can output "mypic"
alert(contentObj); but not the whole content?
The result is: [object object]
Why?
This is the kind of thing that will unify the settings of all scripts now.
I wonder if it would be a waste of resources and time to call json.jsx and mystyle.json all the first time.
//@include "json.jsx";
var script_folder = script_dir();
var jsonFile = File(script_folder + "/mystyle.json");
jsonFile.open('r');
var content = jsonFile.read();
jsonFile.close();
contentObj = JSON.eval(content);
var objStn = contentObj.objStaname;
alert(objStn);
function script_dir() {
try {
return File(app.activeScript).path;
} catch (e) {
return File(e.fileName).path;
}
}

