Deprecated JSON response string over HTTP

Posted on 2011-10-11
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
    LVL 3

    Accepted Solution

    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

    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

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    First off, some of you reading this are already thinking there is an error in the title. It really should be Kindle Fire versus OTHER Android tablets. That's because the Amazon Kindle Fire IS an Android tablet. Well, it is and it's not. It's running…
    Introduction Everyone is using a smartphone these days. Contacts, messages, applications, documents, bookmarks, pictures, videos and other stuff which you created and are present only on your device come under the umbrella called “Personal Data”.…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now