format2json2view
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

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 i format2json2view

Or add to your package.json config file:

"dependencies"{
    "format2json2view": "latest"
}

Implementation Example

Json type

// import the Format2Json2View component
import Format2Json2View from 'Format2Json2View'
 
const json = {a:1,b:true,c:'c'}
 
// use the component in your app!
<Format2Json2View source={json}/>

Json format string

// import the Format2Json2View component
import ReactJson from 'Format2Json2View'
 
const jsonStr = `{"a":1,"b":true,"d":null,"e":true,"f":false,"g":[1,"2",true,false,null,null]}`
 
// use the component in your app!
<Format2Json2View data={json}/>

png

Props

Name Type Description
source json object Supports formatting json format strings

TODO

  • refactor packaging process

Package Sidebar

Install

npm i format2json2view

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

7.87 kB

Total Files

6

Last publish

Collaborators

  • monkeydream