Skip to content

secreek/pretty-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pretty-json

This tiny program reads any JSON code from STDIN and output a well-formatted and colorized version.

Screenshots

Before:

before

After:

after

Installation

Tested only on OS X.

$ sudo curl -s https://raw.github.com/secreek/pretty-json/master/pj >/usr/local/bin/pj \
&& sudo chmod +x /usr/local/bin/pj

Usage

$ curl <url> | pj

or

$ cat <file.json> | pj

Try it now

An original JSON:

$ curl -s http://www.seismi.org/api/eqs?limit=20

Now with formatter and hilighter:

$ curl -s http://www.seismi.org/api/eqs?limit=20 | pj

An even complex sample:

$ curl -s https://api.github.com/events | pj

About

JSON formatter && highlighter in one line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages