title: AFNetworking 2.0 and Response Serialization Options
body: <p>As soon as I trigger a request to a JSON resource I get the following: </p>
  
  <pre><code>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=0x1d87a2c0 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
  </code></pre>
  
  <p>The problem is that where should I set the allow fragments in AFNetworking 2.0? </p>
  
  <p>UPDATE: </p>
  
  <p>My class is a sub class of AFHTTPSessionManager. I already have created a JSONResponseSerializer and it also does not work. </p>
  
  <p>JSON being returned is as follows: </p>
  
  <pre><code>   [{"StoryId":1,"Title":"The big red dog","Abstract":"There was a big red dog and the dog was very big","IsFeatured":true}]
  
  -(instancetype) initWithBaseURL:(NSURL *)url
  {
      NSURL *base = [NSURL URLWithString:@"URL to the web service that returns the json"];
      self = [super initWithBaseURL:base];
  
      AFJSONResponseSerializer *responseSerializer = [AFJSONResponseSerializer serializerWithReadingOptions:NSJSONReadingAllowFragments];
  
      [self setResponseSerializer:responseSerializer];
  
      return self;
  }
  </code></pre>
  
  <p>The error returned is the following: </p>
  
  <pre><code>[0] (null)  @"NSDebugDescription" : @"Invalid value around character 0."
  </code></pre>
  
  <p><strong>RESPONSE FROM WEB SERVER:</strong></p>
  
  <pre><code>[{"StoryId":1,"Title":"The big red dog","Abstract":"There was a big red dog and the dog was very big","IsFeatured":true}]
  </code></pre>
  
  <p><strong>RESPONSE STATUS FROM WEB SERVER:</strong> </p>
  
  <pre><code>HTTP/1.1 200 OK
  Server: Microsoft-IIS/7.0
  X-Powered-By: ASP.NET
  Content-Type: application/json;charset=utf-8
  X-AspNetMvc-Version: 3.0
  Connection: close
  Date: Mon, 28 Oct 2013 20:02:21 GMT
  Content-Length: 121
  Cache-Control: private
  X-AspNet-Version: 4.0.30319
  
  [{"StoryId":1,"Title":"The big red dog","Abstract":"There was a big red dog and the dog was very big","IsFeatured":true}]
  </code></pre>