I don´t feel well relying on 3rd party libs in the JSX world. JSX is (what they call) Adobe-flavoured JavaScript. But it´s not JavaScript. Do a simple test and try to run setTimeout(). That function is undefined. My understanding is that it is "not JavaScript" in that it is specifically not Browser JavaScript. This is similar to the way that JavaScript written in a Node environment does not contain the document global variable (or even the Document class, for that matter). In fact, it appears that ExtendScript equates to the 3rd Edition of ECMA-262 Standard (with some extra goodies). More specifically, ExtendScript is an implementation of ECMAScript. In relation to this point, that Wikipedia article has the following point: pplications written in one implementation may be incompatible with another, unless they are written to use only a common subset of supported features and APIs. The setTimeout() example would appear to be one such API that is not supported in the ExtendScript environment. Third-party libraries that target JavaScript v1.5 have an okay chance of working, though it would be best, of course, to be extremely careful here. By the sound of it, you've vetted the json2.js file already. My point is that the JSON and JSON3 global objects appear to be supplied by Adobe in the ExtendScript environment itself by default, much the same way the global variables app and $ magically exist for your use in ExtendScript environments. You can verify this yourself by checking out the ExtendScript Toolkit's Data Browser when you connect to an application with an empty JSX script. Scroll down a bit and you'll find those two objects alongside a mysterious JSONBlocksToJSONArray() function. No idea what that is but it's there. The objects, functions and vars that you create when your panel is loaded along with your jsx file, are specific to your panel. The objects, functions, and vars that you create in the panel context are specific to your panel, but does the Application (e.g. Premiere Pro) also create a "per-panel" ExtendScript environment instance as well? I.e. if I created two panels and fed each their own JSX file with unique functions defined in the global scope, I would not be able to call a function defined in one context from the other, yes? So is the JSON object. Even if the creator panel is invisible and coded by Adobe itself. Please do not use the existing JSON object in the ExtendScript environment if it´s not created by you!!! I don't follow this part. The JSON and JSON3 objects are built-in and supplied by Adobe. They both contain parse() and stringify() functions that appear to do exactly what you'd expect. It really does seem like they exist for this purpose... Bruce Bullis​, care to weigh in here with an insider's view? What are the JSON and JSON3 global variables? What's the difference? Why are there two?
... View more