{"id":18290796,"url":"https://github.com/convos-chat/jsonhtmlify","last_synced_at":"2026-04-26T23:31:10.677Z","repository":{"id":46859594,"uuid":"200406630","full_name":"convos-chat/jsonhtmlify","owner":"convos-chat","description":"Convert JSON to HTML","archived":false,"fork":false,"pushed_at":"2025-03-11T22:33:15.000Z","size":671,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T07:24:16.352Z","etag":null,"topics":["json"],"latest_commit_sha":null,"homepage":"http://htmlpreview.github.io/?https://github.com/jhthorsen/jsonhtmlify/blob/master/examples/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/convos-chat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-03T18:09:14.000Z","updated_at":"2024-08-05T18:17:24.000Z","dependencies_parsed_at":"2022-09-26T18:31:42.349Z","dependency_job_id":"df20c29b-0b98-4dfd-9aff-4e6022386bcf","html_url":"https://github.com/convos-chat/jsonhtmlify","commit_stats":null,"previous_names":["jhthorsen/jsonhtmlify"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/convos-chat/jsonhtmlify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Fjsonhtmlify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Fjsonhtmlify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Fjsonhtmlify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Fjsonhtmlify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/convos-chat","download_url":"https://codeload.github.com/convos-chat/jsonhtmlify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/convos-chat%2Fjsonhtmlify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["json"],"created_at":"2024-11-05T14:12:15.351Z","updated_at":"2026-04-26T23:31:10.660Z","avatar_url":"https://github.com/convos-chat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"jsonhtmlify\"\u003e\u003c/a\u003e\n\n## jsonhtmlify(json) ⇒ \u003ccode\u003eHTMLElement\u003c/code\u003e\n`jsonhtmlify()` takes any type (object, array, string, null, ...) and converts\nit to a DOM structure.\n\nThis function does not do any styling, and it does also does not provide any\nclick events. See the examples on [github](http://htmlpreview.github.io/?https://github.com/jhthorsen/jsonhtmlify/blob/master/examples/index.html)\nfor information on how to do that.\n\nWhat it does however, is that it adds many classes to the DOM elements, so\nyou style and modify it however you like.\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003eHTMLElement\u003c/code\u003e - A DOM element.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| json | \u003ccode\u003eAny\u003c/code\u003e | An array, boolean, null, number, object or string. |\n\n**Example**  \n```js\n// Import the function\nconst {jsonhtmlify} = require('jsonhtmlify');\n\n// \u003cspan class=\"json-boolean\"\u003etrue\u003c/span\u003e\nconst domNode = jsonhtmlify(true);\n\n// \u003cspan class=\"json-number\"\u003e42\u003c/span\u003e\nconst domNode = jsonhtmlify(42);\n\n// \u003cspan class=\"json-string\"\u003efoo\u003c/span\u003e\nconst domNode = jsonhtmlify('foo');\n\n// \u003cspan class=\"json-null\"\u003enull\u003c/span\u003e\nconst domNode = jsonhtmlify(null);\nconst domNode = jsonhtmlify(undefined);\n\n// \u003cdiv class=\"json-array is-empty\"\u003e\u003c/div\u003e\nconst domNode = jsonhtmlify([]);\n\n// \u003cdiv class=\"json-object is-empty\"\u003e\u003c/div\u003e\nconst domNode = jsonhtmlify({});\n\n// \u003cdiv class=\"json-object has-items\"\u003e\n//   \u003cdiv class=\"json-item contains-number\"\u003e\n//     \u003cspan class=\"json-key\"\u003eage\u003c/span\u003e\u003cspan class=\"json-number\"\u003e36\u003c/span\u003e\n//   \u003c/div\u003e\n//   \u003cdiv class=\"json-item contains-array has-items\"\u003e\n//     \u003cspan class=\"json-key\"\u003elanguages\u003c/span\u003e\u003cspan class=\"json-type\"\u003earray[2]\u003c/span\u003e\n//     \u003cdiv class=\"json-array has-items\"\u003e\n//       \u003cdiv class=\"json-item contains-string\"\u003e\n//         \u003cspan class=\"json-key\"\u003e0\u003c/span\u003e\u003cspan class=\"json-string\"\u003enorwegian\u003c/span\u003e\n//       \u003c/div\u003e\n//       \u003cdiv class=\"json-item contains-string\"\u003e\n//         \u003cspan class=\"json-key\"\u003e1\u003c/span\u003e\u003cspan class=\"json-string\"\u003eenglish\u003c/span\u003e\n//       \u003c/div\u003e\n//     \u003c/div\u003e\n//   \u003c/div\u003e\n// \u003c/div\u003e\nconst domNode = jsonhtmlify({age: 36, languages: ['norwegian', 'english']});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvos-chat%2Fjsonhtmlify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconvos-chat%2Fjsonhtmlify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvos-chat%2Fjsonhtmlify/lists"}