0.1.15 • Published 1 year ago

autommate-react-json-viewer v0.1.15

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

autommate-react-json-viewer

The easy JSON processes, Ever

Build Status

autommate-react-json-viewer allows you to preview JSON and customize label and value via renderer,

Table of Contents

Installation

You need node environment system to use autommate-react-json-viewer. Run the following command to install:

npm install --save autommate-react-json-viewer

Usage

Simply usage format is like below:

import React from 'react';
import JsonTree from 'autommate-react-json-viewer';

function App() {

    const labelRender = (keyPath, key, type, hasParent, hasChild) => {
        return (
            <span>
                <strong>{key} :</strong>
            </span>
        )
    }

    const valueRender = (value) => {
        return <span>{value}</span>
    }

    const jsonData = {
        "name": "AutomMate JSON Viewer",
        "version": "1.0.0",
        "keywords": ["autommate", "json", "viewer"]
    }

    return (
        <JsonTree data={jsonData} expandable={true} labelRender={labelRender} valueRender={valueRender}/>
    );
}

Demo

Click me!

License

MIT ©

0.1.14

1 year ago

0.1.15

1 year ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago