react-json-friendly-viewer

Beautifully display your JSON data for everyone.

Documentations

npm install react-json-friendly-viewer
bash

Usage

Import the component and included CSS:

import { JsonPrettyViewer } from 'react-json-friendly-viewer';
import 'react-json-friendly-viewer/style.css';
<JsonPrettyViewer
json={{
name: 'react-json-friendly-viewer',
private: false,
changes: 1000,
dependencies: {
react: 'latest',
},
createdAt: '1990-10-13T10:51:05.570Z',
hobbies: ['reading', 'eating'],
experiences: [
{
job: 'janitor',
projects: [
{
venue: 'National Museum',
},
],
},
],
referrer: null,
}}
/>;
jsx