I'm getting a JSON file from a WebService, this file comes with the approximate size of 5.7M, so when I'm going to convert your content to JsonArray using the Gson library, it gives me the error:
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 4045314
But the file is correct, when I generate the same file with a slightly smaller amount of content (1.8M), the routine works normally, does anyone know why this occurs, is there a known solution?
Follow the code used:
JsonParser parser = new JsonParser();
JsonElement elem = parser.parse( json.getString("webservice") ); //O erro ocorre aqui;
JsonArray resultado2 = elem.getAsJsonArray();
int len = resultado2.size();
Okay, everybody, excuse me. I found the problem. The file was coming corrupted did not download completely, when I checked the file had seen what the system generated me, not what the tablet dropped.
I apologize and appreciate everyone's support here.