Prettify JSON

If you need to prettify/validate JSON, I found a couple good options like this jsonlint.com website.

I really needed a way to do this from the command line.  So, I placed the following function in my .bashrc script:


function json {
    cat $1 | python -mjson.tool
}

You may also like...

Leave a Reply