AFNetworking/AFNetworking — Issue #143: Exception from JSONKit caused by AFNetworking 0.7.0
Author: leogiertz
Created: 2011-12-06 20:23:19+00:00
State: open

Hey!

I see crashes from an exception from JSONKit in our deployed app, it's originating from line 2316, "The string argument is NULL".

It seems to happen if you send in a an empty NSData object, and try to parse JSON from it. I didn't see this problem on 0.6.0.

Has anyone else gotten this issue, or is it just me? Here's the relevant part of the stack trace:

-[JSONDecoder objectWithUTF8String:length:error:] (in Wrapp) (JSONKit.m:2318)
-[JSONDecoder objectWithData:error:] (in Wrapp) (JSONKit.m:2329)
-[AFJSONRequestOperation responseJSON] (in Wrapp) (AFJSONRequestOperation.m:126)
__+[AFJSONRequestOperation JSONRequestOperationWithRequest:success:failure:]_block_invoke_3 (in Wrapp) (AFJSONRequestOperation.m:69)