How to prettyprint (human readably print) a Python dict in json format (double quotes)?
<p>This is a follow-up question to <a href="https://stackoverflow.com/questions/16087662/pprint-how-to-use-double-quotes-to-display-strings/16087800?noredirect=1#comment59693473_16087800">this one</a>. I need to both prettyprint a python dict (so I can visually inspect/modify it), and I need to have the output in json format (with the double quotes). </p>

<p><code>pprint</code> module prettyprints the dict but uses single quotes (not json!). That's the topic of the linked other question/answer. </p>

<p><code>json.dumps</code> will use the double quotes, but prints it in a big line (not human readable!) </p>

<p>How can we achieve both? </p>