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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…