Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash with iOS9 Xcode7 #186

Open
Baoge2012 opened this issue Sep 21, 2015 · 5 comments
Open

crash with iOS9 Xcode7 #186

Baoge2012 opened this issue Sep 21, 2015 · 5 comments

Comments

@Baoge2012
Copy link

NSString *str = @"{"123123":"1"}";
NSDictionary *jsonObj = [str objectFromJSONString];
[jsonObj JSONData];

crash on [jsonObj JSONData];
only who know how to solve this?

default

@devedup
Copy link

devedup commented Sep 23, 2015

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];

@glb888
Copy link

glb888 commented Sep 26, 2015

X

@jcbertin
Copy link

jcbertin commented Oct 2, 2015

See #158.

@Baoge2012
Copy link
Author

@devedup I did that too.

@ElleSkye117
Copy link

Migrate away from jsonkit. This library hasn't been updated in years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants