Copy link to clipboard
Copied
After updating to version 25.2, I noticed that JSON support has been completely removed.
Now, running scripts that use JSON syntax results in a 'JSON is undefined' error.
This issue was not mentioned in the update list
<title edited by moderator>
Hi @C27618681pmp5, thank you for reporting this issue.
@Dan Ebberts is correct—ExtendScript has never natively supported the JSON object or its asscociated methods. When you have seen the JSON object available, it is because the Libraries panel has polyfilled it in the global scripting namespace. Other third-party-scripts maybe have also done the same. If you open the Libraries panel, I expect you'll find that JSON is again available in scripting.
That said, it is definitely best practice to
...Copy link to clipboard
Copied
I'm not 100% sure about any of this, so please take it with a grain of salt, but my understanding is that JSON support has never been officially part of the AE scripting environment. Apparently though, there have been scripts in the past that have loaded a JSON library into the global namespace so it appears to just be there. So, if you have a script that counts on it being there and the other script is no longer loaded before yours runs, you would see that error. I guess the solution would be to have your script load the json2 library.
Copy link to clipboard
Copied
I tested my script on two different computers,One had the 2024 version installed, while the other had the 2025 version 24.2. No other scripts were installed on either computer. After running the script, the issue only appeared in the 2025 version. Therefore, I believe the answer is definite.
Knowing this issue, my script now includes the complete json2 library and no longer relies on After Effects itself.
Copy link to clipboard
Copied
Hi @C27618681pmp5, thank you for reporting this issue.
@Dan Ebberts is correct—ExtendScript has never natively supported the JSON object or its asscociated methods. When you have seen the JSON object available, it is because the Libraries panel has polyfilled it in the global scripting namespace. Other third-party-scripts maybe have also done the same. If you open the Libraries panel, I expect you'll find that JSON is again available in scripting.
That said, it is definitely best practice to have your script load the JSON API itself in case the Libaries panel hasn't been opened in the current session of After Effects.
Cheers,
- John, After Effects Engineering Team
Copy link to clipboard
Copied
I see, thank you both for your answers