0.1.7 • Published 4 years ago
format2json2view v0.1.7
Format2Json2View
Format2Json2View is a React component for displaying JSON objects.Supports automatically formatting json format strings into json.
Installation Instructions
Install this component with NPM.
npm install --save format2json2view
Or add to your package.json config file:
"dependencies": {
"format2json2view": "latest"
}
Implementation Example
Json type
// import the Format2Json2View component
import ReactJson from 'Format2Json2View'
const json = {a:1,b:true,c:'c'}
// use the component in your app!
<Format2Json2View data={json}/>
Json format string
// import the Format2Json2View component
import ReactJson from 'Format2Json2View'
const jsonStr = "{'a':1,'b':true}"
// use the component in your app!
<Format2Json2View data={json}/>
Props
Name | Type | Description |
---|---|---|
data | json object | Supports formatting json format strings |
TODO
- remove create-react-app
- rewrite webpack