Copy link to clipboard
Copied
I'm writing a script and want to use JSON.stringify() etc., and I'm wondering if it is available as a built-in function for scripts (not talking about expressions here).
If I try it it works, but in the debugger it says that the definition is actually provided by the DUIK scripts that I have installed, so I don't know if
JSON.stringify()
and
JSON.parse()
will work on a machine that doesn't have DUIK installed (asking so I don't have to unistall and reinstall).
1 Correct answer
No, JSON is not natively included in ExtendScript.
What we, script developers usually do, is use this library: https://github.com/douglascrockford/JSON-js/blob/master/json2.js?
Simply download this file, and the use #include 'path/to/json2.js' in your main script to use JSON features.
Copy link to clipboard
Copied
Nope. Those are clearly external node.js functions (or for that matter any of those fancy libraries using them).
Mylenium
Copy link to clipboard
Copied
No, JSON is not natively included in ExtendScript.
What we, script developers usually do, is use this library: https://github.com/douglascrockford/JSON-js/blob/master/json2.js?
Simply download this file, and the use #include 'path/to/json2.js' in your main script to use JSON features.
Copy link to clipboard
Copied
also see
https://aescripts.com/learn/After-Effects-Scripting-JSON-Tutorial/

