A Clojure/Script library that converts JSON/EDN data into human-readable HTML DOM nodes.
json-html is a Clojure and ClojureScript library that converts JSON or EDN data into human-readable HTML representations. It solves the problem of displaying raw, nested data in a structured and visually clear format within web applications, making it easier to inspect and debug data.
Clojure and ClojureScript developers who need to display or debug JSON/EDN data in web interfaces, such as in admin panels, logs, or configuration viewers.
Developers choose json-html for its simplicity, seamless integration with Clojure ecosystems, and ability to produce styled HTML output with minimal code, leveraging the proven json.human.js foundation.
Provide EDN/JSON and get a DOM node with a human representation of the data
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides native functions like `edn->html` and `json->html` for Clojure, plus Hiccup output (`edn->hiccup`, `json->hiccup`) for seamless use with libraries like Reagent in ClojureScript.
Supports extending the `IRenderHTML` protocol to handle custom data types or override defaults, as demonstrated in the README for UUID rendering.
Includes default CSS (`json.human.css`) with semantic classes that immediately format data types (e.g., strings, numbers) for clear visual distinction.
Differentiates between data types like booleans, arrays, objects, and empty collections with specific CSS classes, enhancing readability in output HTML.
The library is tightly coupled to Clojure and ClojureScript runtimes, making it impractical for projects in other languages without significant workarounds.
Generates nested HTML tables for arrays and objects, which can result in bloated DOM structures and suboptimal performance or accessibility with deeply nested data.
Requires explicit inclusion of the provided CSS file for proper styling; omitting it leaves the HTML unstyled and less user-friendly, adding setup overhead.