Cocoa Error 3840 - NSJSONSerialization

后端 未结 2 612
萌比男神i
萌比男神i 2020-12-22 04:57

I\'m trying to parse a JSON string returned from a ASP.NET web service. The return string has been simplified to just this:



        
2条回答
  •  时光取名叫无心
    2020-12-22 05:19

    Try this hope it will work

    if ([operation isKindOfClass:[AFJSONRequestOperation class]] && [operation respondsToSelector:@selector(setJSONReadingOptions:)]) {
        ((AFJSONRequestOperation *)operation).JSONReadingOptions = NSJSONReadingAllowFragments;
    }
    [httpClient enqueueHTTPRequestOperation:operation];
    

提交回复
热议问题