Socket
Socket
Sign inDemoInstall

react-json-to-html

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-json-to-html

A simple React component to render HTML table from JSON object


Version published
Maintainers
1
Created

Changelog

Source

v0.0.1 (2018/01/28)

Initial Release

  • Renders HTML table from JSON object

Readme

Source

react-json-to-html

npm version

A simple React component that renders and HTML table from a JSON object.

Installation

npm install react-json-to-html --save

Usage

A simple example. Download and run the demo for more examples, or browse the examples here.

import React from 'react';
import JsonTable from 'react-json-to-html';

class Nested extends React.Component {
  const json = {
    "Server Name": "foo",
    "Description": "bar",
    "Specs": {
      "IP": "10.100.99.101",
      "MAC": "00:0a:XX:9F:XX:16"
    },
    "Date": "Jan 1, 2018"
  }
  render() {
    return (
      <JsonTable json={json} />
    )
  }
}

export default JsonTable;

alt tag

JsonTable props

NameTypeRequiredDefaultPossible ValuesDescription
json[Object]YesundefinedAny valid JSON objectThe JSON that will get rendered as HTML table

Download Examples

git clone https://github.com/grizzthedj/react-json-to-html.git
cd react-json-to-html
npm install
gulp demo
Browse http://localhost:8080

Backlog

  1. Add more props to control styling and CSS
  2. More tests

Keywords

FAQs

Last updated on 28 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc