snippets/old_snippets/pretty-print-json.en.md

15 lines
414 B
Markdown

---
title: "pretty print json"
date: 2020-01-11T04:37:52+01:00
draft: false
snippet_types: ["curl", "json"]
---
```shell
$ curl -X GET https://some.json.endpoint.com | python -m json.tool
```
Need to check a API request but stuck reading a garbled mess. Try pipeing the result to python json.tool
source:
[stackoverflow](https://stackoverflow.com/questions/352098/how-can-i-pretty-print-json-in-a-shell-script)