cep-json

1.0.1 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i cep-json

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

21.1 kB

Total Files

4

Last publish

Collaborators

  • inventsable