JSONKit icon indicating copy to clipboard operation
JSONKit copied to clipboard

Error in serializing NSNumber

Open mahmoud-khalifa opened this issue 10 years ago • 2 comments

I'm getting EXC_BAD_ACCESS (code=EXC_I368_GPFLT) when trying to convert dictionary that contains NSNumber in method called jk_encode_add_atom_to_buffer in the following line void *objectISA = (JK_EXPECT_F(workAroundMacOSXABIBreakingBug)) ? NULL : *((void **)objectPtr);

here is sample code i tried NSDictionary *dict = @{@"StringKey":@"Value", @"NumberKey" : @5}; NSString* reqString = [dict JSONStringWithOptions:JKSerializeOptionNone error:&jsonError];

is there is any hint why I'm getting this error?

mahmoud-khalifa avatar May 23 '15 13:05 mahmoud-khalifa

I've repaired this problem in my fork: https://github.com/danielStokowski/JSONKit. Let me know if it helped.

danielStokowski avatar Sep 18 '15 12:09 danielStokowski

Or you can try my fork: https://github.com/jcbertin/JSONKit which should handle tagged pointers correctly.

jcbertin avatar Sep 18 '15 18:09 jcbertin