Simple JSON Viewer is the module built to beautify the given JSON.
Features:
- It can be used with any editor by adding a class "simple-json-viewer" to the HTML tag
- it can be used in custom JavaScript by calling the simpleJsonViewer function
- simpleJsonViewer function can be used in Ajax
Usage 1:
Just add some JSON in any html tag with the class name "simple-json-viewer"
<div class="simple-json-viewer">{ "name": "JsonViewer", "author": { "name": "Karthikeyan Manivasagam", "email": "karthikeyanm.inbox@gmail.com" ,"contact": [ { "location": "office" ,"number": 7358196062 } ,{ "location": "home" ,"number": 7358196062 } ] } }</div>
Note : when you add json in drupal text editor then the text format should be "Full html" or selected text format should allow custom tags & classes in text editor
Usage 2:
Define your custom id or class with empty html tag call the simpleJsonViewer function with the custom json
<div id="custom-id"></div>
var json = { "name": "JsonViewer", "author": { "name": "Karthikeyan Manivasagam", "email": "karthikeyanm.inbox@gmail.com" ,"contact": [ { "location": "office" ,"number": 7358196062 } ,{ "location": "home" ,"number": 7358196062 } ] } };
$('#custom-id').simpleJsonViewer(json);
Supporting organizations:
Project information
Seeking new maintainer
The current maintainers are looking for new people to take ownership.- Project categories: Developer tools
2 sites report using this module
- Created by karthikeyan-manivasagam on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.


