Giter VIP home page Giter VIP logo

node-json2html's Introduction

node-json2html

What is node-json2html?

node-json2html is a node modules that implements the HTML templating engine json2html for node.js

Ok so what is json2html?

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

For more information check out the json2html core library

Also implemented for jquery jquery.json2html

Installation

npm install node-json2html

Usage

	var json2html = require('node-json2html');

	var data = [{'male':'Bob','female':'Jane'},{'male':'Rick','female':'Ann'}];

	var transform = {'tag':'div','html':'${male} likes ${female}'};
        
	var html = json2html.transform(data,transform);

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

How do I start?

Check out our website www.json2html.com for more information including detailed usage notes, downloadable examples and more!

node-json2html's People

Contributors

moappi avatar remunda avatar

Watchers

James Cloos avatar dj@!LhaNy - Putr@ Atjeh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.