Pretty print JSON on mac

Using python with json.tool, $python -m json.tool <filename.json>

Or use something like in line 2, below

echo '{"employee_id":1,"full_name":"Sheri Nowmer","first_name":"Sheri","last_name":"Nowmer","position_id":1,"position_title":"President","store_id":0,"department_id":1,"birth_date":"1961-08-26","hire_date":"1994-12-01 00:00:00.0","end_date":null,"salary":80000.0000,"supervisor_id":0,"education_level":"Graduate Degree","marital_status":"S","gender":"F","management_role":"Senior Management"}' > /tmp/emp.json
cat /tmp/emp.json | python -m json.tool

 

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *