← All tools

jsome

Popularity 65 Updated Development & Build

Make your JSON look AWESOME!

npmauto-collected

Installation

npm
npm install -g jsome

Install with npm.

Make your JSON objects look AWESOME! ====================================

This package allows you to give style to your JSON on your console!

Installation :

  $ npm install jsome

if you need to use jsome as a command line, you may need to instal it globally

  $ [sudo] npm install -g jsome

How does it work ?

#### Command line :

Using jsome as a command line, you need to run the following command that takes the path to your json file as argument

  $ jsome /path/to/your/json/file.json
  $ jsome [options] /path/to/your/json/file.json

You can also send a json string through a pipe (|)

  $ cat /path/to/your/json/file.json | jsome

The options available are :

  • -c: to enable or disable colors (defualt value: true)
  • -l: to enable or disable levels (default value: false)
  • -s: to specify the number of tabulation spaces (default value: 2)
  • -r: to specify valid JSON as output (default value: true)

examples :

  $ jsome -c false /path/to/your/file.json
  $ jsome -c false -l true /path/to/your/file.json
  $ jsome -s 4 /path/to/your/file.json

##### Module :

On your nodejs application, when you need to console.log a json object, all you need to do is to use the jsome function