json-to-react

1.0.4 • Public • Published

Json to React - React component to display a json object

Json to React was development to display json using react. The advantage over JSON.stringify is the component can be styled using custom styling

Getting Started

npm install json-to-react

Usage

import JsonToReact from 'json-to-react'

<JsonToReact
  json={json}
/>

Customize Styles

import JsonToReact from 'json-to-react'

const jsonStyles = {
  value: {
    color: 'rgb(0,255,0)'
  },
  key: {
    color: 'rgb(255,255,255)'
  },
  item: {
  },
  child: {
    margin: '0px 16px'
  },
  parent: {
  }
}
<JsonToReact
  json={json}
  jsonStyle={jsonStyles}
/>

Readme

Keywords

Package Sidebar

Install

npm i json-to-react

Weekly Downloads

1

Version

1.0.4

License

MIT

Last publish

Collaborators

  • dbroadhurst