2

My response code is 200 and i get the data succeed , but i find that my json data is not complete .I really don't know why , is my code has something wrong ?

Here is my get data function:

private String getRouteJson(String url) throws IOException {
            HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();    
            connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");    
            connection.setRequestProperty("Accept", "application/json");    
            connection.setRequestMethod("GET");

            int responseCode = connection.getResponseCode();

            Log.d(TAG, "responseCode:"+responseCode );
            StringBuilder jsonIn = new StringBuilder();
            if (responseCode == 200) {
                BufferedReader bf = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String line;
                while ((line = bf.readLine()) != null) {
                    jsonIn.append(line);
                }
            } else {
                Log.d(TAG, "responseCode:"+responseCode );
            }
            connection.disconnect();
            Log.d(TAG, "jsonIn:" + jsonIn.toString());

            return jsonIn.toString();
        }

I get the data that stuck when go to ,"EDUFDATE":"2017/09/07","SPONSER":"Asian EUS Group","EDUTYPE":"Dom

This is my get api: http://114.35.246.42:2212/MobileApp/DEST_WebService.asmx/GetEduData

I havn't meet the issue before , i really don't know hot to fix it.

Is any one can help me solve this problem ? That's would be appreciated !

It gets data util "Dom and stop... enter image description here

enter image description here

Morton
  • 5,380
  • 18
  • 63
  • 118

2 Answers2

2

You want to view full Response ??

Check Following way.

  1. Add Breakpoint where you get response. enter image description here

  2. In DebugConsole there is one option view Check Image enter image description here

It will show your full reponse

Sachin
  • 1,307
  • 13
  • 23
1

You are logging huge data in logcat. Logcat will not display it completely. But the complete data is present jsonIn string. You can continue working on the output

As @shayan commented, you can check this link if you want logcat to show complete data

Community
  • 1
  • 1
Nirup Iyer
  • 1,215
  • 2
  • 14
  • 20
  • Thanks for your responding , but it more complicated than using break point. Thanks your help again. – Morton Apr 18 '17 at 10:09