Deprecated JSON response string over HTTP

Posted on 2011-10-11
Medium Priority
Last Modified: 2013-11-05
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.
Question by:EdFinn
  • 2

Accepted Solution

1ce earned 1000 total points
ID: 36984531
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


Author Comment

ID: 36989892
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.

Author Closing Comment

ID: 37077461
Going to close this, since it's been open so long. Have not found solution yet, but awarding points for the attempt of help.

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question