Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sys-prettier-json

ishin-pie999MIT1.0.1TypeScript support: included

Format JSON with beautiful color

json-formatter

readme

sys-prettier-json

Format JSON with beautiful color

Installation

   npm i sys-prettier-json

or

   yarn add sys-prettier-json

Usage

// index.js

import { prettyJson } from 'sys-prettier-json'

const json = JSON.parse('{ "sys": "Simple Yet Special", "awesome": true, "optional": null, "number": 2022}');

const htmlString = prettyJson(JSON.stringify(json, undefined, 4));

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Ishin Vin - ishin.pie@gmail.com