Hi,
if you have a unformated json expression like
1 | {"Metallica": "Thrash", "GraveDigger": "Power","Kataklsym":"Death"} |
and want to format it readable you could use the python module json.tool
Usage is quite simple:
1 2 3 4 5 6 | michael@debdev ~ # echo '{"Metallica": "Thrash", "GraveDigger": "Power","Kataklsym":"Death"}' | python -m json.tool { "GraveDigger" : "Power" , "Kataklsym" : "Death" , "Metallica" : "Thrash" } |
Or from a file
1 2 3 4 5 6 | michael@debdev ~ # cat myFile.json | python -m json.tool { "GraveDigger" : "Power" , "Kataklsym" : "Death" , "Metallica" : "Thrash" } |
Michael
jq is more powerfull
Hi Oscar,
will give it a try
Michael