Can the command line print readable Json data

  html5, question

I like debugging API on the command line very much, and the returned data is in JSON format. The printed content is too painful

{"status":200,"data":[{"id":1000,"name":"John"},{"id":1004,"name":"Tom"}]}

There are wood and tools to print an easy-to-read style, like this

{
  "status":200,
  "data":
  [
    {
       "id":1000,
       "name":"John"
    },
    {
       "id":1004,
       "name":"Tom"
    }
  ]
}

You can use python’s json.tool!

echo '{"status":200,"data":[{"id":1000,"name":"John"},{"id":1004,"name":"Tom"}]}'|python -mjson.tool
{
    "data": [
        {
            "id": 1000,
            "name": "John"
        },
        {
            "id": 1004,
            "name": "Tom"
        }
    ],
    "status": 200
}