A virtualized JSON viewer.
It supports the following API:
import JSONViewer from './JSONViewer'
const JSON = {
a: 'hello!',
b: [0, 1, 2],
c: {
d: {
e: null
}
}
}
const theme = {
caret: "black",
string: "green",
number: "orange",
boolean: "blueviolet",
null: "crimson",
undefined: "crimson",
}
// JSX
<JSONViewer theme={theme} value={JSON} />
- Clone the repository
- Add a
SAMPLE_JSON.json
file tosrc/
yarn install
yarn start
- Parses the entire source before rendering. In the future nodes will be lazily evaluated as their parents are expanded.
- Keyboard navigation is limited (no arrow key support).