package com.lskycity.androidtools.utils;

/**
 * Created by zhaofliu on 2/6/17.
 */

public class CharsetJsonRequest {
}

@@ -39,83 +39,1405 @@
 s;%0A%0A
-/**%0A * Created by zhaofliu on 2/6/17.%0A */%0A%0Apublic class CharsetJsonRequest %7B
+import com.android.volley.NetworkResponse;%0Aimport com.android.volley.ParseError;%0Aimport com.android.volley.Response;%0Aimport com.android.volley.toolbox.HttpHeaderParser;%0Aimport com.android.volley.toolbox.JsonObjectRequest;%0A%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport java.io.UnsupportedEncodingException;%0A%0A/**%0A * Created by zhaofliu on 2/6/17.%0A */%0A%0Apublic class CharsetJsonRequest extends JsonObjectRequest %7B%0A    public CharsetJsonRequest(int method, String url, JSONObject jsonRequest, Response.Listener%3CJSONObject%3E listener, Response.ErrorListener errorListener) %7B%0A        super(method, url, jsonRequest, listener, errorListener);%0A    %7D%0A%0A    public CharsetJsonRequest(String url, JSONObject jsonRequest, Response.Listener%3CJSONObject%3E listener, Response.ErrorListener errorListener) %7B%0A        super(url, jsonRequest, listener, errorListener);%0A    %7D%0A%0A    @Override%0A    protected Response%3CJSONObject%3E parseNetworkResponse(NetworkResponse response) %7B%0A%0A        try %7B%0A            String jsonString = new String(response.data, %22UTF-8%22);%0A            return Response.success(new JSONObject(jsonString),%0A                    HttpHeaderParser.parseCacheHeaders(response));%0A        %7D catch (UnsupportedEncodingException e) %7B%0A            return Response.error(new ParseError(e));%0A        %7D catch (JSONException je) %7B%0A            return Response.error(new ParseError(je));%0A        %7D%0A    %7D
 %0A%7D%0A

add ChatsetJsonrequest