{"_id":"json-formatter","_rev":"3822290","name":"json-formatter","description":"A JSON to HTML formatter for use with AMD/Non-AMD","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"cmille142","email":""}],"time":{"modified":"2025-06-26T09:03:46.000Z","created":"2013-09-09T19:39:10.558Z","0.1.0":"2013-09-09T19:39:10.558Z"},"users":{},"author":{"name":"Chris Miller","email":"cmille142@gmail.com","url":"http://chrismiller.me"},"repository":{"type":"git","url":"git://github.com/iamchrismiller/JSONFormatter.git"},"versions":{"0.1.0":{"name":"json-formatter","description":"A JSON to HTML formatter for use with AMD/Non-AMD","version":"0.1.0","author":{"name":"Chris Miller","email":"cmille142@gmail.com","url":"http://chrismiller.me"},"repository":{"type":"git","url":"git://github.com/iamchrismiller/JSONFormatter.git"},"scripts":{"test":"grunt jasmine"},"bugs":{"url":"https://github.com/iamchrismiller/JSONFormatter/issues"},"devDependencies":{"grunt-jasmine-runner":"latest","grunt":"latest"},"readmeFilename":"README.md","_id":"json-formatter@0.1.0","dist":{"shasum":"d864268278d929a280d7a93ac38b9b4cdfc451e9","size":41901,"noattachment":false,"key":"/json-formatter/-/json-formatter-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-formatter/download/json-formatter-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"cmille142","email":"cmille142@gmail.com"},"maintainers":[{"name":"cmille142","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T20:39:56.516Z","publish_time":1378755550558,"_cnpm_publish_time":1378755550558}},"readme":"# JSON -> HTML Formatter\n\nA JSON to HTML formatter for use with AMD/Non-AMD\n\n Convert basic JSON datatypes (number, string, boolean, null, object, array) into an HTML fragments.\n\n Code Extracted and modified to be a more reusable following the (Universal Module Definition) pattern.\n\n Based On Firefox/Chrome Extension's :\n  - Ben Hollis @bhollis (Firefox Extension - http://jsonview.com/)\n  - Jamie Wilkinson @jamiew (Chrome Port - https://github.com/jamiew/jsonview-chrome)\n\n## Usage\n\n  `new JSONFormatter(options).toHtml(json);`\n\n  Supported `options`\n    - number\n    - string\n    - boolean\n    - object\n    - array\n\n  Example `options` override\n\n```javascript\n   var formatterOptions = {\n          'string' : function(key,val) {\n            if (key === 'id') return '<a class=\"link\" data-request=\"'+val+'\">'+val+'</a>';\n            return false;\n          }\n        };\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/mit-license.php)/[BSD](http://opensource.org/licenses/bsd-license.php)","_attachments":{},"readmeFilename":"README.md","bugs":{"url":"https://github.com/iamchrismiller/JSONFormatter/issues"}}