Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Stanko/jquery.rainbowJSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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'
});

About

JSON pretty print, jquery plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published