Merge pull request #3238 from mhw/fix-response-json-indentation

Indent JSON examples.
This commit is contained in:
shockey
2017-06-13 15:57:47 -07:00
committed by GitHub

View File

@@ -8,7 +8,7 @@ const getExampleComponent = ( sampleResponse, examples, HighlightCode ) => {
let exampleValue
try {
exampleValue = example && example.toJS ? example.toJS() : example
exampleValue = JSON.stringify(exampleValue)
exampleValue = JSON.stringify(exampleValue, null, 2)
}
catch(e) {
exampleValue = String(example)