Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-json-parser

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-json-parser

Transforms a JSX string to a JSON tree

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

react-json-parser

Transforms a JSX string to a JSON tree

Installation

npm install react-json-parser

CLI Usage

react-json-parser [options]

Options

-h, --help             output usage information
-V, --version          output the version number
-f, --file <file>      JSX file to read, defaults to stdin if not set
-o, --output <output>  JSON destination file, defaults to stdout if not set
-p, --pretty           pretty-print JSON

When the file option is not provided, the JSX string is read from stdin, example:

echo '<MyComponent test />' | react-json-parser --pretty

API usage

const tree = require('react-json-parser').parse('<MyComponent test />')

License

MIT

FAQs

Package last updated on 18 Jul 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc