This project aims to provide an updated version of react-jsonpath-editor, originally by jwatenbe.
Simply import JsonPathViewer from 'react-jsonpath-viewer'.
| Prop name | Description | Type | Default | Optional |
|---|---|---|---|---|
| json | JSON object to query | object | - | ❌ |
| highlightColor | Color to highlight queried json | string | - | ❌ |
| rootChar | JSON path prefix character(s) | string | $ | ✅ |
| component | Allows the use of a custom input component | component | <input> |
✅ |
|
import 'react-jsonpath-viewer/dist/style.css';For more advanced styling JPV adopts a BEM hierarchy of classes that can be utilized.
