Deprecated JSON response string over HTTP

In our Android application we are getting a rather large JSON file over an HttpRequest. The response we get back returns a deprecated by what I believe is the maximum number of characters that is defined either by EntityUtils.toString() or elsewhere and we're looking for a work around to this because at the moment we are artificially limiting the number of objects stored in our JSON.

HttpResponse response = executeHttpRequest(httpRequest);
int statusCode = response.getStatusLine().getStatusCode();
        switch (statusCode) {
            case 200:
                String content = EntityUtils.toString(response.getEntity());

Open in new window


Any idea why this happening and what might be an appropriate solution to this problem.
Who is Participating?
Might not be the answer you are looking for, but have you considered instead of rolling your own http communication, use a more well developed transport library like netty?

For json serialize/deserializing

EdFinnAuthor Commented:
I'll look into Netty, and maybe Json serialization is the approach to take here but it seems strange that DefaultHTTPApi has a character limit on its response.
EdFinnAuthor Commented:
Going to close this, since it's been open so long. Have not found solution yet, but awarding points for the attempt of help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.