Skip to main content

The JSON module provides a JSONConverter class that converts textual JSON specifications into JavaScript objects, and functions.

Through a set of conventions, the JSON module allows the specification of JavaScript class instances, React elements, enumerations and functions (in addition to the basic types created during the JSON parsing process (i.e. arrays, objects, strings, numbers and booleans).

The set of classes, React components, functions, constants and enumerations that should be available to the JSONConverter must be provided via an application-provided configuration object.

Use Cases

Especially in the infovis space, there is a growing need to be able to generate powerful visualizations directly from the backend. Being able to describe a visualization in abstract terms and send it to the front-end for display without modifying JavaScript code can be valuable. Integration supports a declarative system for describing layers and their props, and this declarative API can be trivially exposed via the JSON API.

A JSON layer editor built on the module

See our live demo.

The module was created to enable specifying visualizations using JSON formatted text files and strings, but is completely generic and


Include the Standalone Bundle

<script src="^9.0.0/dist.min.js"></script>
<!-- or -->
<script src="^9.0.0/dist.min.js"></script>
<script src="^9.0.0/dist.min.js"></script>
<script src="^9.0.0/dist.min.js"></script>
<!-- usage -->
<script type="text/javascript">
const {JSONConverter} = deck;

Install from NPM

npm install
# or
npm install
import {JSONConverter} from '';


The valid combinations are defined by the documented API.

Error Handling

Error detection is currently limited and error messages may not be very helpful.