Getting started
npm i react-json-editor-viewer
Easily view json in react
; <JSONViewer data= the: "men" that: "landed" on: "the" moon: "were" maybe: 2 i: "think" probably: "neil armstrong" "buzz aldrin" am_i_right: true />
Make your json viewer collapsible
; <JSONViewer data= the: "men" that: "landed" on: "the" moon: "were" maybe: 2 i: "think" probably: "neil armstrong" "buzz aldrin" am_i_right: true collapsible/>
Edit json easily and listen to changes in the data, hover on elements to add/remove keys
; { thisonJsonChange = thisonJsonChange;} { console;} <JSONEditor data= the: "men" that: "landed" on: "the" moon: "were" maybe: 2 i: "think" probably: "neil armstrong" "buzz aldrin" am_i_right: true collapsible onChange=thisonJsonChange/>
View both the json editor and viewer side by side
; { thisonJsonChange = thisonJsonChange;} { console;} <JSONEditor data= the: "men" that: "landed" on: "the" moon: "were" maybe: 2 i: "think" probably: "neil armstrong" "buzz aldrin" am_i_right: true collapsible onChange=thisonJsonChange view="dual"/>
Configure your optional custom styles
See the source for the Demo App
default
override custom styles