File: extlib/Blapy/extlib/json2html/

Recommend this page to a friend!
  Classes of Emmanuel Podvin   Jam Rules   extlib/Blapy/extlib/json2html/   Download  
File: extlib/Blapy/extlib/json2html/
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Jam Rules
Match objects against a list of rules
Author: By
Last change:
Date: 2 years ago
Size: 1,877 bytes


Class file image Download


What is jquery.json2html?

jquery.json2html is a jquery plug-in that implements the HTML templating engine <a href=''>json2html</a> for client side browers

Ok so what is json2html?

json2html is a javascript HTML templating engine which converts json object to html using json transforms. Note that this jquery.json2html package includes the latest version of json2html.

For more information check out the <a href=''>json2html</a> core library

Also implemented in node.js <a href=''>node-json2html</a>

Why json2html?

Instead of writing HTML templates json2html relies on JSON transforms to convert a source JSON objects to html. The benefit of using a JSON transform is that they are already readable by the browser and DO NOT require any compilation before use. In addition, json2html allows the following

  • Short hand notation for mapping data objects to markup
  • Event binding to DOM objects (exclusively with jquery.json2html)
  • Use of inline functions to allow for complex logic during transformation
  • Dynamic building of transform objects

Example of a Transform?

var transform = 
	{"<>":"span","html":"${name} ${year}"}

Will render into the following html

<li id=1123>
	<span>Jack and Jill (2001)</span>

Where is the project now?

json2html (and jquery.json2html) have been battle hardened and used in thousands of projects since it's original release in 2012.

How do I start?

Check out our website <a href=''></a> for more information including detailed usage notes, downloadable examples and more!