A library that converts JSON data (numbers, strings, booleans, null, objects, arrays) into HTML fragments. Version 0.1.0 is the latest stable release; this is a legacy library with no active updates since 2014. It uses AMD/non-AMD patterns (Universal Module Definition). Unlike modern alternatives like JSONView or react-json-view, this library is unmaintained and lacks browser-focused features, better suited for simple server-side HTML generation from JSON.
npm install json-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a JSONFormatter instance with custom string formatting and converting a JSON object to HTML.
Consider alternatives such as react-json-view or json-viewer.
Always use 'new JSONFormatter(options)'.
Return false from custom functions to fall back to default formatting.
Ensure you import correctly (e.g., const JSONFormatter = require('json-formatter')) and use 'new JSONFormatter(options)'.Call 'new JSONFormatter(options).toHtml(json)' or assign instance: const f = new JSONFormatter(options); f.toHtml(json);
No dependency data recorded yet.