react-json-pretty css code example
Example: react json object pretty
var jsonObject = JSON.parse( jsonString ) // parse to object if necessary
<div>
<pre> // defines preformatted text
{ JSON.stringify( jsonObject, null, 2 ) } // spacing level = 2
</pre>
</div>