How To Parse And Pretty Print JSON With Linux Commandline Tools

parse and pretty print json

1 Response

  1. mike says:

    Hi thanks for the article. I wrote a json prettifier in go. it uses elastic tabs. which for me produces prettier output. it requires go. and can be installed with.

    go get github.com/mrosset/util/tree/master/json/jfmt

    and then you can prettify stdin to stdout like so.

    curl -L http://jsonip.com | jfmt

    for a result looking like this.

    {
    “about” : “/about”,
    “ip” : “50.98.153.164”,
    }

    notice how the fields align using elastic tabs

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.