// Path: src/org/sagemath/droid/models/gson/InteractReply.java
// public static class InteractData {
//     //---POSSIBLE SAGE REPLIES---
//     @SerializedName("application/sage-interact")
//     private SageInteract sageInteract;
// 
//     @SerializedName("text/plain")
//     private String descText;
// 
//     public SageInteract getInteract() {
//         return sageInteract;
//     }
// 
//     public void setInteract(SageInteract sageInteract) {
//         this.sageInteract = sageInteract;
//     }
// 
//     public String getDescText() {
//         return descText;
//     }
// 
//     public void setDescText(String descText) {
//         this.descText = descText;
//     }
// }
// 
// Path: src/org/sagemath/droid/models/gson/InteractReply.java
// public static class SageInteract {
// 
//     private String new_interact_id;
//     private ArrayList<InteractControl> controls;
//     private boolean readonly;
//     private String locations;
//     private ArrayList<ArrayList<ArrayList<String>>> layout;
// 
//     public String getNewInteractID() {
//         return new_interact_id;
//     }
// 
//     public void setNewInteractID(String new_interact_id) {
//         this.new_interact_id = new_interact_id;
//     }
// 
//     public ArrayList<InteractControl> getControls() {
//         return controls;
//     }
// 
//     public void setControls(ArrayList<InteractControl> controls) {
//         this.controls = controls;
//     }
// 
//     public boolean isReadonly() {
//         return readonly;
//     }
// 
//     public void setReadonly(boolean readonly) {
//         this.readonly = readonly;
//     }
// 
//     public String getLocations() {
//         return locations;
//     }
// 
//     public void setLocations(String locations) {
//         this.locations = locations;
//     }
// 
//     public ArrayList<ArrayList<ArrayList<String>>> getLayout() {
//         return layout;
//     }
// 
//     public void setLayout(ArrayList<ArrayList<ArrayList<String>>> layout) {
//         this.layout = layout;
//     }
// }


import com.google.gson.*;
import org.sagemath.droid.models.gson.InteractReply.InteractData;
import org.sagemath.droid.models.gson.InteractReply.SageInteract;
import java.lang.reflect.Type;
package org.sagemath.droid.deserializers;



/**
 * Deserializer for {@link org.sagemath.droid.models.gson.InteractReply.InteractData}
 * @author Nikhil Peter Raj
 */
public class InteractDataDeserializer implements JsonDeserializer<InteractData> {

    private static final String KEY_INTERACT="application/sage-interact";
    private static final String KEY_DESC_TEXT="text/plain";

    @Override
    public InteractData deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {

        JsonObject jsonObject = json.getAsJsonObject();

        JsonElement interact = jsonObject.get(KEY_INTERACT);
        String descText = jsonObject.get(KEY_DESC_TEXT).getAsString();

// Path: src/org/sagemath/droid/models/gson/InteractReply.java
// public static class InteractData {
//     //---POSSIBLE SAGE REPLIES---
//     @SerializedName("application/sage-interact")
//     private SageInteract sageInteract;
// 
//     @SerializedName("text/plain")
//     private String descText;
// 
//     public SageInteract getInteract() {
//         return sageInteract;
//     }
// 
//     public void setInteract(SageInteract sageInteract) {
//         this.sageInteract = sageInteract;
//     }
// 
//     public String getDescText() {
//         return descText;
//     }
// 
//     public void setDescText(String descText) {
//         this.descText = descText;
//     }
// }
// 
// Path: src/org/sagemath/droid/models/gson/InteractReply.java
// public static class SageInteract {
// 
//     private String new_interact_id;
//     private ArrayList<InteractControl> controls;
//     private boolean readonly;
//     private String locations;
//     private ArrayList<ArrayList<ArrayList<String>>> layout;
// 
//     public String getNewInteractID() {
//         return new_interact_id;
//     }
// 
//     public void setNewInteractID(String new_interact_id) {
//         this.new_interact_id = new_interact_id;
//     }
// 
//     public ArrayList<InteractControl> getControls() {
//         return controls;
//     }
// 
//     public void setControls(ArrayList<InteractControl> controls) {
//         this.controls = controls;
//     }
// 
//     public boolean isReadonly() {
//         return readonly;
//     }
// 
//     public void setReadonly(boolean readonly) {
//         this.readonly = readonly;
//     }
// 
//     public String getLocations() {
//         return locations;
//     }
// 
//     public void setLocations(String locations) {
//         this.locations = locations;
//     }
// 
//     public ArrayList<ArrayList<ArrayList<String>>> getLayout() {
//         return layout;
//     }
// 
//     public void setLayout(ArrayList<ArrayList<ArrayList<String>>> layout) {
//         this.layout = layout;
//     }
// }


// Path: src/org/sagemath/droid/deserializers/InteractDataDeserializer.java
import com.google.gson.*;
import org.sagemath.droid.models.gson.InteractReply.InteractData;
import org.sagemath.droid.models.gson.InteractReply.SageInteract;
import java.lang.reflect.Type;

package org.sagemath.droid.deserializers;



/**
 * Deserializer for {@link org.sagemath.droid.models.gson.InteractReply.InteractData}
 * @author Nikhil Peter Raj
 */
public class InteractDataDeserializer implements JsonDeserializer<InteractData> {

    private static final String KEY_INTERACT="application/sage-interact";
    private static final String KEY_DESC_TEXT="text/plain";

    @Override
    public InteractData deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {

        JsonObject jsonObject = json.getAsJsonObject();

        JsonElement interact = jsonObject.get(KEY_INTERACT);
        String descText = jsonObject.get(KEY_DESC_TEXT).getAsString();

        SageInteract sageInteract = context.deserialize(interact,SageInteract.class);