title: How can I pretty-print JSON in a shell script?
body: <p>Is there a (Unix) shell script to format JSON in human-readable form?</p>
  <p>Basically, I want it to transform the following:</p>
  <pre class="lang-json prettyprint-override"><code>{ &quot;foo&quot;: &quot;lorem&quot;, &quot;bar&quot;: &quot;ipsum&quot; }
  </code></pre>
  <p>... into something like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;foo&quot;: &quot;lorem&quot;,
      &quot;bar&quot;: &quot;ipsum&quot;
  }
  </code></pre>