【发布时间】:2012-09-29 20:35:39
【问题描述】:
我正在使用 JSONKit 解析 JSON 字符串,由于某种原因,当尝试将 JSON 字符串分配给 NSDictionary 时它返回 null
JSONDecoder *jsonDecoder = [[JSONDecoder alloc] initWithParseOptions:JKParseOptionNone];
NSData *jsonData = [NSData dataWithBytes:[jsonString UTF8String] length:[jsonString length]];
NSDictionary *tempDict = [jsonDecoder objectWithData:jsonData];
jsonString 保存内容,tempDict 等于NULL
谢谢!
【问题讨论】:
-
您能否提供一些导致问题的输入?只是为了验证,
jsonData不是nil,而是tempDict是?
标签: iphone objective-c ios json jsonkit