Friday 27 October 2017

Parse JSON using jsonlint in Mac

jsonlint Package Installation on Mac


About jsonlint : JSON parser and validator with a CLI!

How to Use:

var jsonlint = require("jsonlint");

jsonlint.parse('{"creative?": false}');

Supported Options:

$ jsonlint -h

Usage: jsonlint [file] [options]

file     file to parse; otherwise uses stdin

Options:
   -v, --version            print version and exit
   -s, --sort-keys          sort object keys
   -i, --in-place           overwrite the file
   -t CHAR, --indent CHAR   character(s) to use for indentation  [  ]
   -c, --compact            compact error display
   -V, --validate           a JSON schema to use for validation
   -e, --environment        which specification of JSON Schema the validation file uses  [json-schema-draft-03]
   -q, --quiet              do not print the parsed json to STDOUT  [false]
   -p, --pretty-print       force pretty printing even if invalid

For Complete Information: https://github.com/zaach/jsonlint

Installation Steps:
  1. Launch Terminal by pressing command+space, type terminal and hit Enter key.

  2. Run

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

  3. Install

    brew install jsonlint
You are done!

0 comments:

Post a Comment

 

Copyright @ 2013 Appychip.

Designed by Appychip & YouTube Channel