https://github.com/naturalcycles/json2html
Render arbitrary json as human-friendly html. CLI and API.
https://github.com/naturalcycles/json2html
cli html json
Last synced: 22 days ago
JSON representation
Render arbitrary json as human-friendly html. CLI and API.
- Host: GitHub
- URL: https://github.com/naturalcycles/json2html
- Owner: NaturalCycles
- Created: 2019-05-05T03:20:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T05:13:30.000Z (over 2 years ago)
- Last Synced: 2025-04-09T23:48:40.768Z (23 days ago)
- Topics: cli, html, json
- Language: HTML
- Homepage:
- Size: 683 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
## @naturalcycles/json2html
> Render arbitrary json as human-friendly html. CLI and API. Inspired by
> [json.human.js](https://github.com/marianoguerra/json.human.js)[](https://www.npmjs.com/package/@naturalcycles/json2html)
[](https://circleci.com/gh/NaturalCycles/json2html)
[](https://github.com/prettier/prettier)# Why
Sometimes you need to render some report to non-technical people, but too lazy to create a custom
html/css template for it. Just throw your json into this library and enjoy the good-enough result.# Install
yarn add @naturalcycles/json2html
# Examples
[Sample output](./src/test/mock1.json.html)
```sh
# Render `my.json` to `my.json.html`
json2html my.json# Render all json files in `someDir`
json2html 'someDir/**/*.json'```
# Packaging
- `engines.node >= 14.15`: Latest Node.js LTS
- `main: dist/index.js`: commonjs, es2020
- `types: dist/index.d.ts`: typescript types
- `/src` folder with source `*.ts` files included