json2page
v0.0.0
Published
convert JSON to html
Downloads
14
Readme
JSON2Page renders JSON to HTML
Usage
Add the page/json2page file to your HTML and use the json2page function.
Use it like this in CoffeeScript:
window.onload = ->
mnt = q "#mnt"
data =
class: "border"
$: [
{
class: "a"
$: [
"": "span", _: "inner text"
]
}, {
class: "a", $: [
"": "span", _: "more text"
]
}
]
log data
mnt.innerHTML = json2page dataOr you can install that from NPM (you may need to add sudo):
npm install -g json2pageAnd use this in you node files:
render = require("json2page").json2page
render "data"Licence
MIT
