Chris Pim 34 Posted November 1, 2018 I have strange problem occurring when parsing a JSON string on iOS using the System.JSON library in Berlin. I call TJSONObject.ParseJSONValue() to get a value from the start of a JSON string which has worked fine if I run under Windows. As soon as I run under iOS, the same JSON string causes a null pointer exception. When debugging through, the null pointer is the TJSONObject class itself which is odd as ParseJSONValue() is a class function so don’t know why that would ever happen. I suspect this isn’t really the case and is just what the debugger is interpreting (the iOS debugger in Berlin isn’t great). I suspect the JSON string is too large for the parser as it’s a huge string. My question is whether anyone is aware of a size limit for parsing a JSON string or whether there’s a known issue in the Berlin JSON libraries which might cause this? Unfortunately I can’t provide a sample JSON string as it’s a client’s backup data but hopefully someone will be able to help. Share this post Link to post
Markus Kinzler 174 Posted November 1, 2018 Perhaps a test with another library helps. Share this post Link to post
Chris Pim 34 Posted November 2, 2018 It looks like the issue was due to a nil character at the end of the string I was parsing, rather than a string length issue. Thanks for your help Markus! Share this post Link to post