JSON Parse Error

前端 未结 4 2015
我寻月下人不归
我寻月下人不归 2021-01-24 17:56

I am using SBJson framework (also known as json-framework) for the iOS.

When parsing a certain JSON file, I am getting the following error: -JSONValue failed. E

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-24 18:31

    If your file is having '\n' or '\r' kind of html qoutes then it may cause error in obj-c. You can add :

    [jsonString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"
    "]

    I was having same problem and solved using this.

提交回复
热议问题