react-basic-json

1.0.1 • Public • Published

React-basic-JSON npm version

A basic JSON Viewer component built for React.

basic-json-gif

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 data={json}/>

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 data={json}/>

Styling

The CSS file Collapsible.css is commented and easy to be customized. Feel free to make changes.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i react-basic-json

Weekly Downloads

0

Version

1.0.1

License

none

Unpacked Size

12.4 kB

Total Files

4

Last publish

Collaborators

  • carlosfrodrigues