# react-pretty-json

> JSON to HTML generator with colors and collapsible brackets.

Latest version **2.0.2** (published 2016-08-17) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install react-pretty-json
pnpm add react-pretty-json
yarn add react-pretty-json
bun add react-pretty-json
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2016-08-17 |
| First published | 2016-08-16 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Martynas Zilinskas |
| Maintainers | quatrodev |
| Keywords | json, to, html, generator |

## Links

- npm: https://www.npmjs.com/package/react-pretty-json
- npm.io page: https://npm.io/package/react-pretty-json

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^15.3.0

## Recent versions

- 2.0.2 (latest) — 2016-08-17
- 2.0.1 — 2016-08-16
- 2.0.0 — 2016-08-16

## README

react-pretty-json
=================
[![NPM version](http://img.shields.io/npm/v/react-pretty-json.svg)](https://www.npmjs.com/package/react-pretty-json) 
[![dependencies Status](https://david-dm.org/quatrocode/react-pretty-json/status.svg)](https://david-dm.org/quatrocode/react-pretty-json) 
[![devDependencies Status](https://david-dm.org/quatrocode/react-pretty-json/dev-status.svg)](https://david-dm.org/quatrocode/react-pretty-json?type=dev)

## Get started
1) Install `react-pretty-json` in your project: 
```sh
$ npm install react-pretty-json
```
2) Import package and pass JSON.
```typescript
import JsonView from 'react-pretty-json';

// ...

render() {
    let obj = {
        example: 'string',
        number: 123,
        boolean: true
    };
    return <JsonView json={obj} />;
}

```

3) (Optional) Importing styles. You can reach it with `react-pretty-json/assets/json-view.css'.
```typescript
import 'react/pretty-json/assets/json-view.css!';
```

## Component props

| Prop    | Type   | Default | Description                            |
|---------|--------|---------|----------------------------------------|
| json`*` | object | none    | Generate object.                       |
| spaces  | number | 4       | Parts that will be generated js files. |

`*` - Required.

## License
[GPL-3.0](LICENSE)

---
_Source: https://npm.io/package/react-pretty-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
