2

我在通过 volley 解析 Json 时遇到问题,这是我的 logcat

08-13 06:05:55.523: D/Volley(902): [134] BasicNetwork.logSlowRequests: HTTP response for request=<[ ] http://www.petbasket.in/service/getProduct.php?category_id=Dog%20Soft%20Toys 0xe4f6ef05 NORMAL 1> [lifetime=12938], [size=158], [rc=200], [retryCount=0]
08-13 06:05:55.563: W/System.err(902): com.android.volley.ParseError: org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
08-13 06:05:55.563: W/System.err(902):  at com.android.volley.toolbox.JsonObjectRequest.parseNetworkResponse(JsonObjectRequest.java:73)
08-13 06:05:55.563: W/System.err(902):  at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:116)
08-13 06:05:55.573: W/System.err(902): Caused by: org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
08-13 06:05:55.573: W/System.err(902):  at org.json.JSON.typeMismatch(JSON.java:111)
08-13 06:05:55.573: W/System.err(902):  at org.json.JSONObject.<init>(JSONObject.java:158)
08-13 06:05:55.573: W/System.err(902):  at org.json.JSONObject.<init>(JSONObject.java:171)
08-13 06:05:55.573: W/System.err(902):  at com.android.volley.toolbox.JsonObjectRequest.parseNetworkResponse(JsonObjectRequest.java:68)

我用于解析的代码是

我正在使用此代码来解析 NAYOSO

RequestQueue reqQueue = Volley.newRequestQueue(this);

    Log.d(TAG, "just after line one in volley");

    Log.d(TAG, url.toString());
    JsonObjectRequest jr = new JsonObjectRequest(Request.Method.GET,
            url.toString(), null, new Response.Listener<JSONObject>() {

                @Override
                public void onResponse(JSONObject response) {
                    // TODO Auto-generated method stub

                    parseJSONResponse(response);
                    Log.d(TAG, "chal hat be" + response);
                    listViewAdapterAfterSelection.notifyDataSetChanged();
                    progress.dismiss();
                }
            }, new Response.ErrorListener() {

                @Override
                public void onErrorResponse(VolleyError error) {
                    Toast.makeText(getBaseContext(), "Network Problem",
                            Toast.LENGTH_LONG).show();
                    error.getCause();
                    error.printStackTrace();
                    progress.dismiss();
                }
            });
    jr.setRetryPolicy(new DefaultRetryPolicy(20000,
            DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
            DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
    reqQueue.add(jr);

    progress = ProgressDialog.show(this, "Please Wait...",
            "Loading Products from Server...");
    /* ================================================================ */
}


private void parseJSONResponse(JSONObject response) {

    try {
        Log.v(TAG, "Before array");
        JSONArray entries = response.getJSONArray("products");

        for (int count = 0; count < entries.length(); count++) {
            JSONObject anEntry = entries.getJSONObject(count);
            Product product = new Product(anEntry.optInt("entity_id"),
                    anEntry.optString("name"),
                    anEntry.optString("short_description"),
                    anEntry.optInt("price"), anEntry.optString("thumbnail"));
            afterSelectionItems.add(product);
        }
    } catch (JSONException e) {
        e.printStackTrace();
    }
}`

回应是:

08-13 08:13:50.213: D/Volley(1723): [156] BasicNetwork.logSlowRequests: HTTP response for request=<[ ] http://www.petbasket.in/service/getProduct.php?category_id=Utility 0xe4f6ef05 NORMAL 1> [lifetime=9563], [size=159], [rc=200], [retryCount=0]
4

2 回答 2

4

为了优化代码,我们使用 Volley 进行网络调用,同样您应该使用 GSON 或 JACKSON json 解析器来优化 json 解析速度,减少编码。

您的请求的 JSON 响应格式(在测试 json Payload 为 154kb 时!!):

{
"products": [
    {
        "short_description": "Aqua Action Ball for Dogs Karlie is for dogs", 
        "entity_id": "560", 
        "price": "400.0000", 
        "name": "Aqua Action Ball for Dogs Karlie", 
        "thumbnail": "/9j/4AAQSkZJRgABAQEBLAEsAAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAA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de2c8mgXuQOZOl/ZRoHMjaZN3HQdF23Vp02bl9C+Zn6henPdjL47Cahv5LHJ29zcd9xaz3PcUBLApcxkh+HdfcjIXy3PcNqijbEwRxiwAsB0GyolDozmBWgdtuvzqy2x+pWx3MvM687cyW2pu7JwkEciSNnb3EP9m4PPwassq2SOB3VmXp5dSW6vUft3qHM7pYm19/CZNbS2y1pB7EN8XDSNGsXHCmFTGpIZie8E8GjhZZMLy+91LGoq5KIlEWH7ibQ7Ybs2C43cnQeE1FBGCsf19okjxA/PY/+tOf6SKkHFuxUHxtf4gtW6f6BOkHTObj1BjNjsI93C4eMXks93CrA8g+zNI0f+VNSMrzzVQpYhyW/ba1trK3jtLSCOCCFBHHHGoVEUDgKAPAAH4FVq8ADQL1ZLF43M2UuNy+Ptr20nUrLBcwrLG6n5DKwII/uKIQDoVG3fb09un/AHzzNlqK7xVzprJwG2guJ8IwhFxZwp7awe0QY04TtAdV5ARR5A4qQcVU6BrjcaLdu1m02gdmNI2+idudO22HxUDe40cI8zSlQGlkY+Wdu0cmuCbqxrQwWCy+uFJKIlESiJREoiURKIlESiJREoiURKIlESiJREoi/9k="
    }, 
    {
        "short_description": null, 
        "entity_id": "561", 
        "price": "400.0000", 
        "name": "Crazy Critters Skinneeez", 
        "thumbnail": "/9j/4AAQSkZJRgABAQIAGwAbAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCABBAEYDAREAAhEBAxEB/8QAHQAAAgICAwEAAAAAAAAAAAAACAkGBwEFAAIDCv/EADUQAAEDAwQBAgQFAwMFAAAAAAECAwQFBhEABxIhCBMxCRQiQRUjQlFxMjNhFhdDUmKBkcH/xAAbAQACAwEBAQAAAAAAAAAAAAA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ubjy6FEZbp79JTJ9OLKlJjx4sRvkvkVrISlIAx2c56++vn9P1uoauUVy87eFjwfQJKjpujjZ423XLbBb/ApMqsR6JDloRKLyGCl5xLaVOkkcVKUeI7AwSeyQB76vqosun9NL7t/wAFOqvhVD6je235Gv8Aw56XWY+wrtTr05cqTOq76WlupPqJYaShCUKUT9QCueP2zjXoujJqht+3+DzHVu36+IrwjX+dnivufvYmg7ibPXdJRcdpJUWrblz1MU2pdkhY/QmRgqRlYKVIVxKkYCtazWTLYAtStjy3u6+altBbnjdWqXcqYTThXIfSGYjDhCfmFvHDJA5YSQs9pPRII0u1DQzbw08c7k8cdp49rXxfUm6bhkEOyn1rLjENP6YsdSxzU2jJ+pfaiSQEjCQ1FJ5Q8tlM7o7BbkePV+bh7zbLUBi5bQuimO1Wp20guCXHqra+SVRktpJU2orcWQO0pLicf0abxJYZBryigzsHv159US0a1Jt2HYdspqMpVWlzA6FoU3hsLjsOJC3spKuOSE8s5Vgaio4bJJ5Qz+wLHt7bSyaHt/akT5akW/AZp8NrOSGm0hIKj91HGSfuSTqQFC76+K4uy703zabeROUW61BQ6W1vMLHF70lZHa0qV1kdn9iRry3Uek316j9XoXhvlLnflrPv0el0HVqpaZ6TVrK8N8fGf5ewZqH8LhcXc6s3RQNwKnLps+pJkxI9RhrZNMQHAv8AOWpXJ9xIyEcAB0nkQCcd7rt1EIRpXY4+eH8+PP8Akz4XqmcnqMST8Zyvj9+hiO31jUTbazaVZFvNKRBpMcMtlX9TiskrWr/uUoqUf8nWrRTGitVx4RnXWyvsdkuWSE+2rSs80/2x/P8A90AeugDB+386AOff/wAaAOK9tAHU+2k+ARk/b+NMDGgD/9k="
    }, 
    {
        "short_description": null, 
        "entity_id": "562", 
        "price": "199.0000", 
        "name": "Dog Toy Ball With Terry Cloth Assorted Karlie", 
        "thumbnail": "/9j/4AAQSkZJRgABAQEAZABkAAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgAC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qOUpPMpazkDmr+IHeAAOmDm9FyUFaFfDK8aN0NirRuu5N1Ykyi1S6ZMdpuhvuNOekzHCyiQtTalDmv1lJ4nBAb79xqZlSAnXIBGCMjRSuNctuRK7TXIpYb9T3SriNYa9FtemWOEgq7HljpCXaf4aWNW9xW9yJtAWa4xw9N/5txLQKEFCVemDjISca8Shg/wAPh5wil8tsZGgcQ4yRPMEk7Txtwtl9dr63xDhL+/ouruT4x2vfj8Gs3httatxTKPCVBhvSoCS40wU8QnKSOXEft5ZKT2nB16lKi+3YKdPZoEADYADoFgc5rySeSs1t9vCDczbWvSp9hWtVrktlwFbbcdsuzYX/AEcQBydA/i4kHr3APZ2mVJEO5WIthajeHu00/a/xzse1rtiPGuNQPnZzctxTi4zz6i6WByJ4JbCkoCB0OJxq0A7oNldymWVtllbSCg9FJSMH+tIRfmPGjxGgxGZQ02MkJQMDSIRfTAHtqUXuiI0RGiI0RGiI0RGiI0RGiI0RGiI0RGiI0RGiI0RGiI0Rf//Z"
    }
]

}

private void parseJSONResponse(JSONObject response) {

    final JsonArray jsonArr = response.getJSONArray("products");;
        //final List<Country> cards
        ArrayList<MyPojo> numberList = new Gson().fromJson(jsonArr,
                new TypeToken<List<MyPojo>>() {
                }.getType());

for(MyPojo model : numberList) {

            afterSelectionItems.add(model); 

      }
}

POJO:

import java.util.List;

public class MyPojo{
    private List<Products> products;

    public List<Products> getProducts(){
        return this.products;
    }
    public void setProducts(List<Products> products){
        this.products = products;
    }
}


    import java.util.List;

    public class Products{
        private String entity_id;
        private String name;
        private String price;
        private String short_description;
        private String thumbnail;

        public String getEntity_id(){
            return this.entity_id;
        }
        public void setEntity_id(String entity_id){
            this.entity_id = entity_id;
        }
        public String getName(){
            return this.name;
        }
        public void setName(String name){
            this.name = name;
        }
        public String getPrice(){
            return this.price;
        }
        public void setPrice(String price){
            this.price = price;
        }
        public String getShort_description(){
            return this.short_description;
        }
        public void setShort_description(String short_description){
            this.short_description = short_description;
        }
        public String getThumbnail(){
            return this.thumbnail;
        }
        public void setThumbnail(String thumbnail){
            this.thumbnail = thumbnail;
        }
    }

如果您像我一样懒惰,请使用 pojo 生成器作为您的 json 响应http://www.jsonschema2pojo.org/

如果您未能在 logCat 中显示完整的 json 响应,请尝试使用此Android Volley 库不返回整个响应数据

于 2013-09-12T08:15:58.303 回答
2

Volley has helpful error classes that can help you with error handling. Example:

public void onErrorResponse(VolleyError error) {                
    if(error instanceof NoConnectionError)
        Toast.makeText(MyActivity.this, "No internet available", Toast.LENGTH_SHORT).show();
    else if(error instanceof ServerError)
        Toast.makeText(MyActivity.this, "Invalid username/password", Toast.LENGTH_SHORT).show();    
    }
}

Have a look at the error classes available: https://github.com/mcxiaoke/android-volley/tree/master/src/com/android/volley

Hope it helps

于 2014-08-13T08:21:34.277 回答