title: Expected BEGIN_OBJECT but was NUMBER at line 1 column 65 path $.data
body: <p>I am trying to use Gson library to parse an api response. Here is the response String:</p>
  
  <pre><code>{
  "data": {
    "Thresh": {
       "id": 412,
       "title": "Zincirli Gardiyan",
       "name": "Thresh",
       "key": "Thresh"
    },
    "Aatrox": {
       "id": 266,
       "title": "Darkin Kılıcı",
       "name": "Aatrox",
       "key": "Aatrox"
    },
    "Tryndamere": {
       "id": 23,
       "title": "Barbar Kral",
       "name": "Tryndamere",
       "key": "Tryndamere"
    },
    "Gragas": {
       "id": 79,
       "title": "Kavgacı Ayyaş",
       "name": "Gragas",
       "key": "Gragas"
    },
    "Cassiopeia": {
       "id": 69,
       "title": "Yılanın Şefkati",
       "name": "Cassiopeia",
       "key": "Cassiopeia"
    },
    "type": "champion",
    "version": "4.14.2"
    }
  }
  </code></pre>
  
  <p>Here are my classes:</p>
  
  <pre><code>public class Champion {
      private int id;
      private String title;
      private String name;
      private String key;
      public int getId() {
          return id;
      }
      public void setId(int id) {
          this.id = id;
      }
      public String getTitle() {
          return title;
      }
      public void setTitle(String title) {
          this.title = title;
      }
      public String getName() {
          return name;
      }
      public void setName(String name) {
          this.name = name;
      }
      public String getKey() {
          return key;
      }
      public void setKey(String key) {
          this.key = key;
      }
  }
  </code></pre>
  
  <p>and response class:</p>
  
  <pre><code>public class ChampionsResponse {
  
      private String type;
      private String version;
      private Map&lt;String, Map&lt;String, Champion&gt;&gt; data;
      public String getType() {
          return type;
      }
      public void setType(String type) {
          this.type = type;
      }
      public String getVersion() {
          return version;
      }
      public void setVersion(String version) {
          this.version = version;
      }
      public Map&lt;String, Map&lt;String, Champion&gt;&gt; getData() {
          return data;
      }
      public void setData(Map&lt;String, Map&lt;String, Champion&gt;&gt; data) {
          this.data = data;
      }
  }
  </code></pre>
  
  <p>I use the following line to use gson library:</p>
  
  <pre><code>Gson gson = new Gson();
  try{
      ChampionsResponse championsResponse = gson.fromJson(response, ChampionsResponse.class);
  }catch(Exception e){
      e.printStackTrace();
  }
  </code></pre>
  
  <p>But i get the exception saying that "Expected BEGIN_OBJECT but was NUMBER at line 1 column 65 path $.data..". Can anyone tell me where i am mistaken?</p>
  
  <p>Thanks</p>