title: Gson Deserialization of Mixed Object types
body: <p>I have a JSON:</p>
  
  <pre><code>"account_representatives": [
        {
          "Sales Person": 1307,
          "default_ticket_assignments": [
            ""
          ],
          "Primary Account Manager": 1307,
          "Secondary Support-3": 1151,
          "Relationship Mgr": 1307,
          "authorized_resources": [
            ""
          ],
          "Technical Account Manager": 164
        }
      ]
  </code></pre>
  
  <p>and I have a class whose structure is like this:</p>
  
  <pre><code>public class AccountRepresentative {
  
          @SerializedName("authorized_resources")
          @Expose
          private List&lt;String&gt; authorizedResources = new ArrayList&lt;String&gt;();
          @SerializedName("default_ticket_assignments")
          @Expose
          private List&lt;String&gt; defaultTicketAssignments = new ArrayList&lt;String&gt;();
          @Expose
          private Map&lt;String, String&gt; repFields;
  
          /**
           * @return The authorizedResources
           */
          public List&lt;String&gt; getAuthorizedResources() {
              return authorizedResources;
          }
  
          /**
           * @param authorizedResources The authorized_resources
           */
          public void setAuthorizedResources(List&lt;String&gt; authorizedResources) {
              this.authorizedResources = authorizedResources;
          }
  
          /**
           * @return The defaultTicketAssignments
           */
          public List&lt;String&gt; getDefaultTicketAssignments() {
              return defaultTicketAssignments;
          }
  
          /**
           * @param defaultTicketAssignments The default_ticket_assignments
           */
          public void setDefaultTicketAssignments(List&lt;String&gt; defaultTicketAssignments) {
              this.defaultTicketAssignments = defaultTicketAssignments;
          }
  
          /**
           *
           * @return the dynamic jsonObjects
           */
          public Map&lt;String, String&gt; getRepFields() {
              return repFields;
          }
  
          /**
           * @param repFields The repFields
           */
          public void setRepFields(Map&lt;String, String&gt; repFields) {
              this.repFields = repFields;
          }
      }
  </code></pre>
  
  <p>I'm using GSON to bind these, I'm able to bind the 2 JsonArrays.</p>
  
  <p>I can also deserialized dynamic properties w/o the jsonArrays by using <a href="https://stackoverflow.com/questions/2779251/how-can-i-convert-json-to-a-hashmap-using-gson">How can I convert JSON to a HashMap using Gson?</a>,</p>
  
  <p>but in this case, I have no idea how to get the dynamic properties, 
  My plan supposedly is to turn the dynamic properties into hashmap, but the 2 jsonArrays are in the way.</p>
  
  <p>Thanks for the help, </p>