// Path: app/src/main/java/com/timehop/droidcon2014retrofitsample/data/reddit/model/RedditObject.java
// public abstract class RedditObject {
// }
// 
// Path: app/src/main/java/com/timehop/droidcon2014retrofitsample/data/reddit/model/RedditObjectWrapper.java
// public class RedditObjectWrapper {
//   RedditType kind;
//   JsonElement data;
// 
//   public RedditType getKind() {
//     return kind;
//   }
// 
//   public JsonElement getData() {
//     return data;
//   }
// }


import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditObject;
import com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditObjectWrapper;
import java.lang.reflect.Type;
package com.timehop.droidcon2014retrofitsample.data.reddit;




public class RedditObjectDeserializer implements JsonDeserializer<RedditObject> {
  public static final String TAG = RedditObjectDeserializer.class.getSimpleName();
  public static final String KIND = "kind";

  public RedditObject deserialize(JsonElement json, Type type, JsonDeserializationContext context)
      throws JsonParseException {
    if (!json.isJsonObject()) {
      // if there are no replies, we're given a String rather than an object
      return null;
    }
    try {
// Path: app/src/main/java/com/timehop/droidcon2014retrofitsample/data/reddit/model/RedditObject.java
// public abstract class RedditObject {
// }
// 
// Path: app/src/main/java/com/timehop/droidcon2014retrofitsample/data/reddit/model/RedditObjectWrapper.java
// public class RedditObjectWrapper {
//   RedditType kind;
//   JsonElement data;
// 
//   public RedditType getKind() {
//     return kind;
//   }
// 
//   public JsonElement getData() {
//     return data;
//   }
// }


// Path: app/src/main/java/com/timehop/droidcon2014retrofitsample/data/reddit/RedditObjectDeserializer.java
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditObject;
import com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditObjectWrapper;
import java.lang.reflect.Type;

package com.timehop.droidcon2014retrofitsample.data.reddit;




public class RedditObjectDeserializer implements JsonDeserializer<RedditObject> {
  public static final String TAG = RedditObjectDeserializer.class.getSimpleName();
  public static final String KIND = "kind";

  public RedditObject deserialize(JsonElement json, Type type, JsonDeserializationContext context)
      throws JsonParseException {
    if (!json.isJsonObject()) {
      // if there are no replies, we're given a String rather than an object
      return null;
    }
    try {
      RedditObjectWrapper wrapper = new Gson().fromJson(json, RedditObjectWrapper.class);