Open Baoge2012 opened 9 years ago
I just ditched JSonKit completely and replaced with the Foundation version:
NSError *error = nil;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:str
options:NSJSONWritingPrettyPrinted error:&error];
if (!jsonData) {
NSLog(@"Error creating JSON object %@", error);
}
and
NSError* error;
NSDictionary *result = [NSJSONSerialization
JSONObjectWithData:data
options:kNilOptions
error:&error];
X
See #158.
@devedup I did that too.
Migrate away from jsonkit. This library hasn't been updated in years.
NSString str = @"{\"123123\":\"1\"}"; NSDictionary jsonObj = [str objectFromJSONString]; [jsonObj JSONData];
crash on [jsonObj JSONData]; only who know how to solve this?