SkillAgentSearch skills...

Json2html.js

This is a repository to build HTML based in json struct

Install / Use

/learn @fauxcompany/Json2html.js
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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.

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated3y ago
Forks3

Languages

HTML

Security Score

70/100

Audited on Aug 16, 2022

No findings