1.0.3 • Published 5 years ago

json2html.js v1.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

json2html

This is a repository to build HTML based in json struct

Badges

Github

tag issues contributors license code-size top-languages languages

Social

forks stars watchers

Contributors

Others

BCH compliance

Base Struct

The json payload is as follow:

{
	"tag": "div",
	"attributes": {
		"id": "some-id",
		"class": "some-class"
	},
	"children": [
		//...components or "some-text-or-html"
	],
}

Restrictions

If the component tag is self closing, content and children will be ignored;

Usage

	var someJson = {};
	JSON2HTML.build(someJson);
	var someHtml = '<div></div>';
	JSON2HTML.unbuild(someHtml);

You can check the example in docs folder.

Contributions

Yes, please! Everybody is welcome.

1.0.3

5 years ago

1.0.2

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.1

5 years ago