Skip to content

Inventsable/CEP-JSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CEP-JSON

Quick and dirty async function to evalScript Douglas Crockford's json2.js for Adobe CEP panels and polyfill support for JSON.stringify() and JSON.parse() within Adobe scripting

# installation
npm i CEP-JSON
import loadJSON from "cep-json";
// OR:
const loadJSON = require("cep-json").default;

// Usage within async/await
await loadJSON();

// Usage as thenable
loadJSON().then(() => {
  console.log(
    "JSON is loaded, you can now invoke JSON.parse and JSON.stringify through any JSX/evalScript call."
  );
});

NOTE:

  • This package uses the evalScript() method from the workaround package, which may not work in a custom panel of your own when run from within <iframe> elements unless you follow the steps outlined in workaround's README (to use an event chain for bypassing CORS restrictions in newest versions of Adobe apps)

About

Async polyfill to add JSON.parse and JSON.stringify to JSX (Adobe scripting) environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors