JSONML transformation utility
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
JSONML-1.0.0.js
LICENSE
README.md

README.md

jsonml

JSONML transformation utility.

Basic Usage

Include the utility:

<script src="JSONML-1.0.0.js"></script>

Create JSONML elements:

var names = ['John', 'Sarah', 'Mike'];

var ul = ['ul', {'class': 'list'}];
var li;

names.forEach(function(name) {
li = ['li', {'class':'list-item'}, name];
	ul.push(li);
});

Use makeDOMElement to transform the JSONML elements to DOM elements:

$container = jQuery('#container-names');
$container.append(
	JSONML.makeDOMElement(ul)
);

License

Licensed under the MIT license. (http://opensource.org/licenses/MIT)