Unescaped control character around character 981.Error while parsing JSON

As per you told there is problem related to "\n"

So i suggest you can add "\" which will work for you like below

"\n"=> "\\n"

Because this are special character call backspace character.

Hope you get your answer


NSLog the NSData that you received and have a look what you find around byte 981. The thing with unescaped control characters is that they are invisible, so you can't see them in an NSString, but you'll see them in the NSData.

If your data has length 981 bytes or very close then there's a chance that your code processed incomplete JSON data which will almost always fail; that's something you need to fix. If there is a control character between some items (say between two array elements) then this might be a bug in the server code.