title: php json_encode & newline, swift JSONSerialization causing weird output
body: <p>Some issue with PHP JSON and Swift JSON. Please help me to figure out what is up with the extra spaces, \n and other stuff. Why is the output not a clean continuous string. I don't need to pretty print or anything.</p>
  
  <p>PHP:</p>
  
  <pre><code>$sql = "SELECT * FROM entries";
  $stmt = $db-&gt;prepare($sql);
  $stmt-&gt;execute();
  $entries = $stmt-&gt;fetchAll(PDO::FETCH_OBJ);
  $db = null;
  echo '{"root":'.json_encode($entries).'}';
  </code></pre>
  
  <p>Swift:</p>
  
  <pre><code>    var request : NSMutableURLRequest = NSMutableURLRequest()
      request.URL = NSURL(string: url)
      request.HTTPMethod = "GET"
  
      NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue(), completionHandler:{ (response:NSURLResponse!, data: NSData!, error: NSError!) -&gt; Void in
  
          var error: NSError?
          let jsonResult = NSJSONSerialization.JSONObjectWithData(data, options:NSJSONReadingOptions.AllowFragments, error: &amp;error) as? NSDictionary
  
          if (jsonResult != nil) {
              println(jsonResult?.description )
          } else {
              println(jsonResult?.description)
          }
  </code></pre>
  
  <p>Console Output:</p>
  
  <pre><code>Optional("{\n    root =     (\n                {\n            id = 1;\n            text = \"Test Entry\";\n        },\n                {\n            id = 2;\n            text = \"Test Entry 2\";\n        }\n    );\n}")
  </code></pre>
  
  <p>Database:</p>
  
  <p><img src="https://i.stack.imgur.com/XBKNQ.png" alt="enter image description here"></p>