title: Format JSON string in scala
body: <p>Is there a straight forward way to format a JSON string in scala?</p>
  
  <p>I have a JSON String like this:</p>
  
  <pre><code>val json = {"foo": {"bar": {"baz": T}}}
  </code></pre>
  
  <p>Can I use a function <code>f</code> such that:</p>
  
  <pre><code>f(json) = {
             "foo": 
                  {"bar": 
                         {"baz": T}
                  }
             }
  </code></pre>
  
  <p>I know the formatting I have done in my answer is no perfect, but you get the point. And yes, can it be done without using Play Framework?</p>