{"id":17676560,"url":"https://github.com/yoannchb-pro/json-html","last_synced_at":"2026-05-01T09:32:40.691Z","repository":{"id":57687051,"uuid":"470321087","full_name":"yoannchb-pro/json-html","owner":"yoannchb-pro","description":"Convert json to html","archived":false,"fork":false,"pushed_at":"2022-03-15T20:34:27.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-21T04:42:15.785Z","etag":null,"topics":["converter","html","json"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoannchb-pro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-15T20:26:19.000Z","updated_at":"2022-05-23T09:41:41.000Z","dependencies_parsed_at":"2022-09-19T08:40:38.067Z","dependency_job_id":null,"html_url":"https://github.com/yoannchb-pro/json-html","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yoannchb-pro/json-html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fjson-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fjson-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fjson-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fjson-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoannchb-pro","download_url":"https://codeload.github.com/yoannchb-pro/json-html/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fjson-html/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","html","json"],"created_at":"2024-10-24T07:26:03.164Z","updated_at":"2026-05-01T09:32:40.675Z","avatar_url":"https://github.com/yoannchb-pro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-into-html v1.0.0\nConvert json to html\n\n## Installation\n```\nnpm i json-into-html\n```\n\n## Example\n```js\nconst { Json2Html } = require('json-into-html');\nconst fs = require(\"fs\");\n\nconst html = Json2Html([\n    {\n        name: \"html\",\n        content: [\n            {\n                name: 'head',\n                content: [\n                    {\n                        name: 'title',\n                        content: \"My title\"\n                    },\n                    {\n                        name: \"style\",\n                        content: \"body,html{ margin: 0; paddin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column; color: #fff; font-familly: Arial, 'sans-serif'; background-color: #663399}\"\n                    }\n                ]\n            },\n            {\n                name: 'body',\n                content: [\n                    {\n                        name: 'div',\n                        content: [\n                            {\n                                name: 'img',\n                                attr: {\n                                    src: 'https://upload.wikimedia.org/wikipedia/commons/d/d9/Flag_of_Canada_%28Pantone%29.svg',\n                                    class: 'test test2'\n                                }\n                            },\n                            {\n                                name: 'a',\n                                content: 'click here',\n                                attr: {\n                                    href: '#'\n                                }\n                            }\n                        ]\n                    }\n                ]\n            }\n        ]\n    }\n]);\n\nfs.writeFileSync('index.html', html);\n```\n\n## Result\n```html\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eMy title\u003c/title\u003e\n        \u003cstyle\u003e\n            body,html{ margin: 0; paddin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column; color: #fff; font-familly: Arial, 'sans-serif'; background-color: #663399}\n        \u003c/style\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003cdiv\u003e\n            \u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/d/d9/Flag_of_Canada_%28Pantone%29.svg\" class=\"test test2\"/\u003e\n            \u003ca href=\"#\"\u003eclick here\u003c/a\u003e\n        \u003c/div\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoannchb-pro%2Fjson-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoannchb-pro%2Fjson-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoannchb-pro%2Fjson-html/lists"}