// Path: app/src/main/java/org/wordcamp/android/objects/speaker/Terms.java
// public class Terms {
// 
//     @SerializedName("wcb_track")
//     @Expose
//     private List<WcbTrack> wcbTrack = new ArrayList<WcbTrack>();
// 
//     /**
//      *
//      * @return
//      *     The wcbTrack
//      */
//     public List<WcbTrack> getWcbTrack() {
//         return wcbTrack;
//     }
// 
//     /**
//      *
//      * @param wcbTrack
//      *     The wcb_track
//      */
//     public void setWcbTrack(List<WcbTrack> wcbTrack) {
//         this.wcbTrack = wcbTrack;
//     }
// 
// }
// 
// Path: app/src/main/java/org/wordcamp/android/utils/CustomGsonDeSerializer.java
// public class CustomGsonDeSerializer implements JsonDeserializer<Terms> {
// 
//     @Override
//     public Terms deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
//         //Terms object when null returns an empty array rather then empty list
//         if (json instanceof JsonArray) {
//             return null;
//         } else {
//             Gson gson = new Gson();
//             return gson.fromJson(json,Terms.class);
//         }
//     }
// }


import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.HttpHeaderParser;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.apache.http.HttpStatus;
import org.wordcamp.android.objects.speaker.Terms;
import org.wordcamp.android.utils.CustomGsonDeSerializer;
import java.io.UnsupportedEncodingException;
package org.wordcamp.android.networking;





/**
 * Created by shah.aagam on 30/07/15.
 */
public class WCRequest<T> extends Request<T> {

    private final Gson gson;
    private ResponseListener<T> responseListener;
    private Class<T> requestType;

    public WCRequest(String url, Class<T> typeResponse, Response.ErrorListener listener, ResponseListener<T> responseListener) {
        super(Method.GET, url, listener);
        this.responseListener = responseListener;

        gson = new GsonBuilder().registerTypeHierarchyAdapter(Terms.class,
// Path: app/src/main/java/org/wordcamp/android/objects/speaker/Terms.java
// public class Terms {
// 
//     @SerializedName("wcb_track")
//     @Expose
//     private List<WcbTrack> wcbTrack = new ArrayList<WcbTrack>();
// 
//     /**
//      *
//      * @return
//      *     The wcbTrack
//      */
//     public List<WcbTrack> getWcbTrack() {
//         return wcbTrack;
//     }
// 
//     /**
//      *
//      * @param wcbTrack
//      *     The wcb_track
//      */
//     public void setWcbTrack(List<WcbTrack> wcbTrack) {
//         this.wcbTrack = wcbTrack;
//     }
// 
// }
// 
// Path: app/src/main/java/org/wordcamp/android/utils/CustomGsonDeSerializer.java
// public class CustomGsonDeSerializer implements JsonDeserializer<Terms> {
// 
//     @Override
//     public Terms deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
//         //Terms object when null returns an empty array rather then empty list
//         if (json instanceof JsonArray) {
//             return null;
//         } else {
//             Gson gson = new Gson();
//             return gson.fromJson(json,Terms.class);
//         }
//     }
// }


// Path: app/src/main/java/org/wordcamp/android/networking/WCRequest.java
import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.HttpHeaderParser;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.apache.http.HttpStatus;
import org.wordcamp.android.objects.speaker.Terms;
import org.wordcamp.android.utils.CustomGsonDeSerializer;
import java.io.UnsupportedEncodingException;

package org.wordcamp.android.networking;





/**
 * Created by shah.aagam on 30/07/15.
 */
public class WCRequest<T> extends Request<T> {

    private final Gson gson;
    private ResponseListener<T> responseListener;
    private Class<T> requestType;

    public WCRequest(String url, Class<T> typeResponse, Response.ErrorListener listener, ResponseListener<T> responseListener) {
        super(Method.GET, url, listener);
        this.responseListener = responseListener;

        gson = new GsonBuilder().registerTypeHierarchyAdapter(Terms.class,
                new CustomGsonDeSerializer()).create();