title: Parsing dynamic JSON data with Gson
body: <p>I'm a beginner Java and Gson user and have been able to apply it to my needs. I now have some JSON data that I need to parse into a spinner as follows:</p>
  
  <pre><code>{
      "lang":[
          "arabic",
          "bengali",
          "dutch-utf8",
          "eng_root",
          "english",
          "english-utf8",
          ...
       ],
       "themes":{
           "blue":{
               "chinese_ibm500":1,
               "spanish":1,
               "bengali":1,
               "japanese":1,
               "english":1,
               "russian":1,
               "french-utf8":1,
               "eng_root":1,
               "arabic":1,
               "spanish-utf8":1,
               "portuguese":1,
               ...
           },
           "green":{
               "eng_root":1,
               "engmonsoon":1,
               "english":1
               ...
           },
           "red":{
               "chinese_ibm500":1,
               "spanish":1,
               "bengali":1,
               ...
           }
      }  
  }
  </code></pre>
  
  <p>So from this JSON I need 2 things:</p>
  
  <p>1) the array under lang is dynamic as for its the languages installed on the server. How could I get all the entries?</p>
  
  <p>I have a class as follows but im stuck as to what I should do after I return lang</p>
  
  <pre><code>public class ListData {
  
      private List&lt;Language&gt; lang;
  
      public List&lt;Language&gt; getLang {
          return lang;
      }
  
      public static class Language {
          ???
      }
  }
  </code></pre>
  
  <p>2) after understanding 1 I might be able to figure this one out. Under themes are colors which again can be more or less {purple, orange, whatever}. I just need a list of those themes, as far as I'm concerned I don't need to know the languages for each.</p>
  
  <p>Feel like this question is turning into a book. I have searched SO extensively and hate asking questions but I'm pretty stumped. Thanks in advance.</p>