Friday, 2 June 2017

unix - How can I pretty-print JSON in a shell script?

Is there a (Unix) shell script to format JSON in human-readable form?



Basically, I want it to transform the following:



{ "foo": "lorem", "bar": "ipsum" }


... into something like this:



{

"foo": "lorem",
"bar": "ipsum"
}

No comments:

Post a Comment