I'm developing an Android (2.2) application in which I get from a web service a string containing the JSON serialized version of a list of custom objects, which results in a JSONArray string of JSONObject. The received string is well formed, as I can see at eyesight and as I can prove with online validator. At one point in the Android application, I pass this string to a JSONArray constructor, to get an array of JSONObject. Here's the problem: the JSONArray constructor throws an exception, stating that at some point the string ends with a invalid terminator: but the point indicated in the exception is far from the real end of the string. The fact is that the string in question is huge (about 160000 chars): does anyone know if there's a limit to the length of a string when passed to the JSONArray constructor? The string variable held in memory is full-length, so it seems to me that the JSONArray constructor kindof truncates it. Is it possible?
Thanks in advance, regards