title: NSJSONSerialization adding \n to beginning and end of JSON string
body: <p>I have an iOS application that needs to post some information to the server in json format. In particular, I need to pick up an NSArray of Strings and convert it into a NSString in json format. I am using the following code to create the string:</p>
  
  <pre><code>NSData *jsonData = [NSJSONSerialization dataWithJSONObject:_selectedStyles options:NSJSONReadingMutableContainers error:&amp;error];
      if(error){
          //TODO: handle error
      }
  NSString *selectedStylesInJson = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
  </code></pre>
  
  <p>However, the string that comes out of that is the following:</p>
  
  <pre><code>@"[\n  \"schlager\",\n  \"volkstuemlicherSchlager\"\n]"
  </code></pre>
  
  <p>As you can see, the NSJSONSerialization method is inserting a \n before and after every string in the array, which is incorrect.</p>
  
  <p>How can I make iOS convert this array in the correct format? The format I am looking for is:</p>
  
  <pre><code>["object 1", "object 2"]
  </code></pre>