React-basic-JSON
A basic JSON Viewer component built for React.
Install
npm install react-basic-json
Usage
import BasicJSON from 'react-basic-json'const json = make: 'Ford' model: 'Mustang' year: 1969 message: mid: 'mid.1457764197618:41d102a3e1ae206a38' seq: 73 ;<BasicJSON =/>
You can also pass a string representing a JSON as the data property. Example:
const json ='{"make":"Ford","model":"Mustang","year":1969,"message":{"mid":"mid.1457764197618:41d102a3e1ae206a38","seq":73}}'<BasicJSON =/>
Styling
The CSS file Collapsible.css
is commented and easy to be customized. Feel free to make changes.
License
MIT