1.0.7 • Published 3 years ago

@tri-bit/react-json-previewer v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-json-previewer

A compact way to view object contents as JSON - Click on the component to toggle preview on/off. Intended as a simple debugging tool during react development.

alt text

Installation

npm install @tri-bit/react-json-previewer

Usage

import  JSONPreviewer  from '@tri-bit/react-json-previewer';


const sourceObject = {example:'object'};

<JSONPreviewer sourceObject={sourceObject} />

Props

propdescription
sourceObjectThe only required prop - the contents of this object will be displayed by the component
displayTypeDefault value is true - toggles the display of object key's type in parentheses after the key's name
previewTitleThe always displayed title of the preview component, "JSONPreviewer" is the default value
expandedDefault value is false - If true the preview will remain opened
stringDisplayLimitDefault value is 1024 - Shortens the display of long strings. Set to -1 to remove the limit
flattenArraysDefault value is true - Arrays are flattened into a string for a more compact view, set false to disable
1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.407

4 years ago

1.0.410

4 years ago

1.0.404

4 years ago

1.0.406

4 years ago

1.0.402

4 years ago

1.0.387

4 years ago

1.0.385

4 years ago

1.0.382

4 years ago

1.0.381

4 years ago

1.0.378

4 years ago

1.0.36

4 years ago

1.0.33

4 years ago

1.0.34

4 years ago

1.0.31

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.30

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.12

4 years ago

1.0.1

4 years ago