views:

770

answers:

2

Has anyone had issues with a size limit on a returned JSON Object using the JSON Parser that is available for the iPhone?

Here is a link to the JSON framework I am using:

http://code.google.com/p/json-framework/downloads/list (I am using the latest version)

If I reduce the size of the returned JSON my app will run just fine. If the object gets too large, the app crashes with the below error:

-JSONValue failed. Error trace is: ( Error Domain=org.brautaset.JSON.ErrorDomain Code=3 UserInfo=0x4141580 "Unrecognised leading character"

Don't be fooled though... it has nothing to do a leading character except that it seems to split the JSON at a certain size and then ends up with a random leading character because the next JSON string starts with a random character.

+2  A: 

Looks like I was wrong. I was trying to parse the JSON in a didReceiveData callback method, which gets called multiple times as data is received. I needed to concatenate the result as it came in and then parse the JSON in connectionDidFinishLoading.

Thanks for looking.

a432511
A: 

There is may be a solution for you: link

Yannick L.