title: JSON deserializing List in java with no type information
body: <pre><code>class Result {
    private List orders;// Holds objects of class Object only.
    private Number a;
    private Number b;
  }
  
  class Order {
    private Number oid;
    private Number status;
  }
  
  public class TestClass {
  public static void main(String... args){
      String testString = "{\"orders\":[{\"oid\":\"347\",\"status\":\"1\"},{\"oid\":\"348\",\"status\":\"1\"}],\"a\":14.15,\"b\":0}";
      Gson gson = new GsonBuilder().create(); 
      Result res = gson.fromJson( testString, Result.class );
  }
  </code></pre>
  
  <p>Class Result cannot be modified. Json does not have type information of the list and Json is not able to parse. </p>
  
  <ol>
  <li>Assuming we cannot change these classes, how will be solve this problem? Consider the case when there can be multiple such lists of different type.</li>
  <li>What if the list contains objects of multiple types?</li>
  </ol>