Three ways to integrate JSON Crack into your app: iframe widget, postMessage API, or the React component.
For React applications, use the jsoncrack-react package for a native integration with full control over props and callbacks. See the npm page for the full API reference and latest documentation.
The simplest way to embed JSON Crack. Add an iframe pointing to /widget and it will render an interactive graph viewer.
Pass a json query parameter with a URL to automatically fetch and display remote data. This works on both the widget and the editor page.
For dynamic updates, use the postMessage API to send JSON data and display options to the widget at any time.
Important: The iframe must be defined before the script tag. The widget posts its id attribute back to the parent when ready — listen for this message before sending data.