title: JSON text did not start with array or object and option to allow fragments not set
body: <p>I'm sending this json response from server for a request to my IOS 7 app. </p>
  
  <pre><code>{
   "root": {
      "success": "1",
      "message": "Successfully retrieved data.",
      "data": {
          "records": [
              {
                  "receipt_key": "xxxxxxxx",
                  "receipt_id": "xxxxxxxx",
                  "store_name": "xxxxxx",
                  "amount": "xxxx",
                  "date_purchase": "xxxxxxxx",
                  "is_processed": "x",
                  "created_on": "xxxxxxxx",
                  "modified_on": "xxxxxxxx",
                  "modified_on_millis": "xxxxxxxx",
                  "user_folder": "xxxxxxxx",
                  "category_id": "xxxxxxxx",
                  "is_deleted": "x",
                  "currency_id": "xxxxxxxx"
              }
          ]
      }
  }
  }
  </code></pre>
  
  <p>I use the following code for parsing the above json to NSDictionary object. </p>
  
  <pre><code> NSMutableDictionary *json=[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&amp;error];
  </code></pre>
  
  <p>But I'm getting this error on the above code. </p>
  
  <blockquote>
    <p>Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be
    completed. (Cocoa error 3840.)" (JSON text did not start with array or
    object and option to allow fragments not set.) UserInfo=0x8a8a700
    {NSDebugDescription=JSON text did not start with array or object and
    option to allow fragments not set.}</p>
  </blockquote>