Quantcast
Channel: Hacker News 100
Viewing all articles
Browse latest Browse all 5394

json.human.js - Json Formatting for Human Beings

$
0
0

Comments:"json.human.js - Json Formatting for Human Beings"

URL:http://marianoguerra.github.io/json.human.js/


Provide JSON and get a DOM node with a human representation of that JSON.

Why?

At Event Fabric we need to display JSON to people from all technical levels without being too technical but also without losing information about the underlying JSON object.

How?

you can see js/demo.js in the repo for an example, here is a short one

 var node = JsonHuman.format(input);
 output.appendChild(node);

Try it

edit the JSON and click Convert

Input: JSON

{ "name": "json.human", "description": "Convert JSON to human readable HTML", "author": "Mariano Guerra ", "tags": ["DOM", "HTML", "JSON", "Pretty Print"], "version": "0.1.0", "main": "json.human.js", "license" : "MIT", "dependencies": { "crel": "1.0.0" }, "repository": { "type": "git", "url": "git://github.com/marianoguerra/json.human.js.git" }, "bugs": { "url": "http://github.com/marianoguerra/json.human.js/issues" }, "contributors": [], "config": { "what?": "this object is just to show some extra stuff", "how?": ["add json.human.js", "add json.human.css", "???", "profit!"], "customization?": ["customize the css prefix", "change the css file"], "integer": 42, "float": 12.3, "bool": true } }

Convert

Output: HTML

Raw HTML

License?

MIT

Alternatives


Viewing all articles
Browse latest Browse all 5394

Trending Articles