Last Updated: February 25, 2016
·
443
· epishkin

prettify json input

If you need to pretty print input of one-line per json objects here is what I use.

Source

cat pretty-json

while read LINE
do
  echo $LINE | python -mjson.tool
done

How to use:

avrotools.sh tojson part-00000_5.avro | pretty-json > part-00000_5.json