title: JSON - no Response data, using Retrofit and Gson
body: <p>Issue: Request is being done(hits are increasing) but there is no Response.
  What I did so far:
   - I rechecked all the namings and type
   - Went through all similar StackOverflow questions</p>
  
  <p>Log:</p>
  
  <pre><code>Attempted to deserialize a java.lang.Class. Forgot to register a type adapter?
  </code></pre>
  
  <p>Json data:</p>
  
  <pre><code>{
  "total": 1,
  "error": "",
  "train": [
  {
    "travel_time": "21:15",
    "from": {
      "name": "GORAKHPUR",
      "code": "GKP"
    },
    "number": "12591",
    "src_departure_time": "06:35",
    "to": {
      "name": "NAGPUR",
      "code": "NGP"
    },
    "classes": [
      {
        "available": "N",
        "class-code": "2S"
      },
      {
        "available": "Y",
        "class-code": "3A"
      },
      {
        "available": "N",
        "class-code": "CC"
      },
      {
        "available": "N",
        "class-code": "FC"
      },
      {
        "available": "N",
        "class-code": "1A"
      },
      {
        "available": "Y",
        "class-code": "SL"
      },
      {
        "available": "N",
        "class-code": "3E"
      },
      {
        "available": "Y",
        "class-code": "2A"
      }
    ],
    "days": [
      {
        "runs": "N",
        "day-code": "MON"
      },
      {
        "runs": "N",
        "day-code": "TUE"
      },
      {
        "runs": "N",
        "day-code": "WED"
      },
      {
        "runs": "N",
        "day-code": "THU"
      },
      {
        "runs": "N",
        "day-code": "FRI"
      },
      {
        "runs": "Y",
        "day-code": "SAT"
      },
      {
        "runs": "N",
        "day-code": "SUN"
      }
    ],
    "no": 1,
    "name": "GKP-SBC EXP",
    "dest_arrival_time": "03:50"
  }
  ],
  "response_code": 200
  }
  </code></pre>
  
  <p>TrainFromToResponse.java:</p>
  
  <pre><code> package com.vyshnav.trainfromto.model;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  
  import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  public class TrainFromToResponse {
  
  private int total;
  private String error;
  private List&lt;Train&gt; train = new ArrayList&lt;Train&gt;();
  private int response_code;
  
  
  /**
   *
   * @return
   * The train
   */
  public List&lt;Train&gt; getTrain() {
      return train;
  }
  
  /**
   *
   * @param train
   * The train
   */
  public void setTrain(List&lt;Train&gt; train) {
      this.train = train;
  }
  
  /**
   *
   * @return
   * The responseCode
   */
  public int getResponseCode() {
      return response_code;
  }
  
  /**
   *
   * @param responseCode
   * The response_code
   */
  public void setResponseCode(int responseCode) {
      this.response_code = responseCode;
  }
  
  /**
   *
   * @return
   * The total
   */
  public int getTotal() {
      return total;
  }
  
  /**
   *
   * @param total
   * The total
   */
  public void setTotal(int total) {
      this.total = total;
  }
  
  /**
   *
   * @return
   * The error
   */
  public String getError() {
      return error;
  }
  
  /**
   *
   * @param error
   * The error
   */
  public void setError(String error) {
      this.error = error;
  }
  }
  </code></pre>
  
  <p>Train.java:</p>
  
  <pre><code>package com.vyshnav.trainfromto.model;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  
  import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  public class Train {
  
  private List&lt;Days&gt; days = new ArrayList&lt;Days&gt;();
  private int no;
  private String number;
  private String dest_arrival_time;
  private To to;
  private From from;
  private List&lt;Class&gt; classes = new ArrayList&lt;Class&gt;();
  private String name;
  private String src_departure_time;
  private String travel_time;
  
  
  /**
   *
   * @return
   * The days
   */
  public List&lt;Days&gt; getDays() {
      return days;
  }
  
  /**
   *
   * @param days
   * The days
   */
  public void setDays(List&lt;Days&gt; days) {
      this.days = days;
  }
  
  /**
   *
   * @return
   * The no
   */
  public int getNo() {
      return no;
  }
  
  /**
   *
   * @param no
   * The no
   */
  public void setNo(int no) {
      this.no = no;
  }
  
  /**
   *
   * @return
   * The number
   */
  public String getNumber() {
      return number;
  }
  
  /**
   *
   * @param number
   * The number
   */
  public void setNumber(String number) {
      this.number = number;
  }
  
  /**
   *
   * @return
   * The destArrivalTime
   */
  public String getDestArrivalTime() {
      return dest_arrival_time;
  }
  
  /**
   *
   * @param destArrivalTime
   * The dest_arrival_time
   */
  public void setDestArrivalTime(String destArrivalTime) {
      this.dest_arrival_time = destArrivalTime;
  }
  
  /**
   *
   * @return
   * The to
   */
  public To getTo() {
      return to;
  }
  
  /**
   *
   * @param to
   * The to
   */
  public void setTo(To to) {
      this.to = to;
  }
  
  /**
   *
   * @return
   * The from
   */
  public From getFrom() {
      return from;
  }
  
  /**
   *
   * @param from
   * The from
   */
  public void setFrom(From from) {
      this.from = from;
  }
  
  /**
   *
   * @return
   * The classes
   */
  public List&lt;Class&gt; getClasses() {
      return classes;
  }
  
  /**
   *
   * @param classes
   * The classes
   */
  public void setClasses(List&lt;Class&gt; classes) {
      this.classes = classes;
  }
  
  /**
   *
   * @return
   * The name
   */
  public String getName() {
      return name;
  }
  
  /**
   *
   * @param name
   * The name
   */
  public void setName(String name) {
      this.name = name;
  }
  
  /**
   *
   * @return
   * The srcDepartureTime
   */
  public String getSrcDepartureTime() {
      return src_departure_time;
  }
  
  /**
   *
   * @param srcDepartureTime
   * The src_departure_time
   */
  public void setSrcDepartureTime(String srcDepartureTime) {
      this.src_departure_time = srcDepartureTime;
  }
  
  /**
   *
   * @return
   * The travelTime
   */
  public String getTravelTime() {
      return travel_time;
  }
  
  /**
   *
   * @param travelTime
   * The travel_time
   */
  public void setTravelTime(String travelTime) {
      this.travel_time = travelTime;
  }
  }
  </code></pre>
  
  <p>From.java:</p>
  
  <pre><code>package com.vyshnav.trainfromto.model;
  
  import java.util.HashMap;
  import java.util.Map;
  
  import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  public class From {
  
  private String code;
  private String name;
  
  
  /**
   *
   * @return
   * The code
   */
  public String getCode() {
      return code;
  }
  
  /**
   *
   * @param code
   * The code
   */
  public void setCode(String code) {
      this.code = code;
  }
  
  /**
   *
   * @return
   * The name
   */
  public String getName() {
      return name;
  }
  
  /**
   *
   * @param name
   * The name
   */
  public void setName(String name) {
      this.name = name;
  }
  }
  </code></pre>
  
  <p>To.java:</p>
  
  <pre><code>package com.vyshnav.trainfromto.model;
  
  import java.util.HashMap;
  import java.util.Map;
  
  import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  public class To {
  
  private String code;
  private String name;
  
  /**
   *
   * @return
   * The code
   */
  public String getCode() {
      return code;
  }
  
  /**
   *
   * @param code
   * The code
   */
  public void setCode(String code) {
      this.code = code;
  }
  
  /**
   *
   * @return
   * The name
   */
  public String getName() {
      return name;
  }
  
  /**
   *
   * @param name
   * The name
   */
  public void setName(String name) {
      this.name = name;
  }
  }
  </code></pre>
  
  <p>Classes:</p>
  
  <pre><code>package com.vyshnav.trainfromto.model;
  
  import com.google.gson.annotations.SerializedName;
  
  import java.util.HashMap;
  import java.util.Map;
  
  import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  public class Classes {
  
  private String available;
  @SerializedName("class-code")
  private String classCode;
  
  
  /**
   *
   * @return
   * The available
   */
  public String getAvailable() {
      return available;
  }
  
  /**
   *
   * @param available
   * The available
   */
  public void setAvailable(String available) {
      this.available = available;
  }
  
  /**
   *
   * @return
   * The classCode
   */
  public String getClassCode() {
      return classCode;
  }
  
  /**
   *
   * @param classCode
   * The class-code
   */
  public void setClassCode(String classCode) {
      this.classCode = classCode;
  }
  }
  </code></pre>
  
  <p>Days:</p>
  
  <pre><code>package com.vyshnav.trainfromto.model;
  
  import com.google.gson.annotations.SerializedName;
  
  import java.util.HashMap;
  import java.util.Map;
  
  import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  public class Days {
  
  private String runs;
  @SerializedName("day-code")
  private String dayCode;
  
  
  /**
   *
   * @return
   * The runs
   */
  public String getRuns() {
      return runs;
  }
  
  /**
   *
   * @param runs
   * The runs
   */
  public void setRuns(String runs) {
      this.runs = runs;
  }
  
  /**
   *
   * @return
   * The dayCode
   */
  public String getDayCode() {
      return dayCode;
  }
  
  /**
   *
   * @param dayCode
   * The day-code
   */
  public void setDayCode(String dayCode) {
      this.dayCode = dayCode;
  }
  }
  </code></pre>