yajl

Fast C library for parsing and generating JSON data.

brewmacoslinux
Try with needOr install directly
Source

About

Yet Another JSON Library

Commands

json_reformatjson_verify

Examples

pretty print JSON in terminal$ json_reformat < input.json
validate JSON file for syntax errors$ json_verify < input.json
format and reformat JSON with indentation$ json_reformat -i 2 < messy.json > formatted.json
check if JSON is valid without printing output$ json_verify input.json && echo 'Valid JSON'
minify JSON by removing whitespace$ json_reformat -i 0 < input.json > minified.json