🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

rainbowJSON is a jQuery based JSON formatting and syntax Highlighting plugin to make your JSON objects & strings collapsible, colorful and more user readable.

Syntax-Highlighting json

Documentation

jquery.rainbowJSON

JSON pretty print, jQuery plugin. Takes JSON and makes it way more readable and colorful :) Also it adds folding. You can choose depth of the recursion and maximum children elements which will be printed. Similar to var_dump() in php.

Usage

$('.makeItNice').rainbowJSON({     maxElements: 0, // maximum elements per object that will be printed (0 is unlimited)     maxDepth: 0, // maximum depth for recursive printing (0 is unlimited)     json: null, // json as object or in string format (if empty, html of the DOM object will be used)     bgColor: '#F5FAFF' // background color of the div, which will be used for shading }); 

Example

rainbowJSON in action

Options used in image above:

$('.makeItNice').rainbowJSON({ 	maxElements: 7, 	maxDepth: 4 });  $('.makeItNiceGreen').rainbowJSON({ 	maxElements: 3, 	maxDepth: 3, 	bgColor: '#D8FFF2' }); 

You May Also Like