jsonkit 解析nsarray 时候 报错

前端之家收集整理的这篇文章主要介绍了jsonkit 解析nsarray 时候 报错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

jsonkit 解析nsarray 时候 报错

Assertion failure in -[TXJKArray count],/Users/mqq/hudson/1740/src/TencentOpenApi_IOS/Common/Util/JSONKit.m:738



解决办法:

Had the same issue,I was trying to set the output straight to a dictionary I had created.
myDictionary = [string objectFromJSONString];

solved it by setting the output to a temporary dictionary and making a copy
NSDictionary *tempDictionary =[string objectFromJSONString];
myDictionary = [tempDictionary copy];

JSONKit is a very nice tool I will continue to use it!

猜你在找的Json相关文章