jsonFormatter Example

Default Theme, Default Options Example

$('.jsonFormatter').jsonFormatter();
{stringValue:"string value",numberValue:-4.506,booleanValue:true,arrayOfStrings:['one','two','three'],arrayOfObjects:[{firstProperty:1,secondProperty:2},{firstProperty:3,secondProperty:4}],undefinedProperty:undefined,emptyProperty:{}}

Default Theme, Custom Options

$('.jsonFormatterCustom').jsonFormatter({ quoteKeys: false, collapsible: false, hideOriginal: false });
{stringValue:"string value",numberValue:-4.506,booleanValue:true,arrayOfStrings:['one','two','three'],arrayOfObjects:[{firstProperty:1,secondProperty:2},{firstProperty:3,secondProperty:4}],undefinedProperty:undefined,emptyProperty:{}}

Dark Theme Example

$('.jsonFormatter').jsonFormatter();
{stringValue:"string value",numberValue:-4.506,booleanValue:true,arrayOfStrings:['one','two','three'],arrayOfObjects:[{firstProperty:1,secondProperty:2},{firstProperty:3,secondProperty:4}],undefinedProperty:undefined,emptyProperty:{}}

Invalid JSON Example

$('.jsonFormatter').jsonFormatter();
This is not a valid JSON string.