I've a file with a sequence of JSON element:
{ element0: "lorem", value0: "ipsum" }
{ element1: "lorem", value0: "ipsum" }
...
{ elementN: "lorem", value0: "ipsum" }
Is there a shell script to format JSON to display file content in a readable form?
I've seen this post, and I think is a good starting point!
My idea is to iterate rows in the file and then:
while read row; do echo ${row} | python -mjson.tool; done < "file_name"
Does anyone have any other ideas?
Shawn's solution but for Python 3: