I use the following code for converting Json string(strWebserviceResult) to my Object:
EntMyClass entMyClass = gson.fromJson(strWebserviceResult,EntMyClass.c
Try using the fromJson method that takes a JsonReader as input instead. This should allow you to not need the whole input string to be in memory at one time. Here's some sample code:
final HttpURLConnection c = (HttpURLConnection) url.openConnection();
final InputStreamReader isr = new InputStreamReader(c.getInputStream());
final JsonReader reader = new JsonReader(isr);
final EntMyClass entMyClass = GSON.fromJson(reader, EntMyClass.class);
reader.close();
c.disconnect();