title: How to map multiple JSON responses to a single Java POJO?
body: <p>Need to map multiple types of JSON responses to a single POJO so that I can compare the different objects to provide insight about the differences.</p>
  
  <p>I had tried mapping the first response to the POJO and parsed the second response to populate the defined POJO:</p>
  
  <pre><code>    class XXX {
          @JsonProperty("accountHolder")
          private String accountHolder;
          @JsonProperty("routingNumber")
          private String routingNumber;
          @JsonProperty("balance")
          private List&lt;Balance&gt; balance;
          @JsonProperty("accountName")
          private String accountName;
          @JsonProperty("bankTransferCodeType")
          private String bankTransferCodeType;
          @JsonProperty("individualInformation")
          private IndividualInformation individualInformation;
          @JsonProperty("acctType")
          private String acctType;
          @JsonProperty("transactionList")
          private TransactionList transactionList;
          @JsonProperty("accountNumber")
          private String accountNumber;
          @JsonProperty("uniqueId")
          private String uniqueId;
          @JsonProperty("bankNetID")
          private String bankNetID;
          @JsonIgnore
          private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
      }
  </code></pre>
  
  <p>First response:</p>
  
  <pre><code>
  [
      {
          "ACCOUNT_NAME": "",
          "ACCOUNT_NUMBER": "",
          "AVAILABLE_BALANCE": null,
          "CURRENT_BALANCE": "",
          "FULL_ACCOUNT_NUMBER": null,
      }
  ]
  </code></pre>
  
  <p>Second response:</p>
  
  <pre><code>"bankAccount": [
        {
          "accountName": "",
          "accountNumber": "",
          "routingNumber": "",
          "fullAccountNumber": "",
          "bankTransferCodeType": "",
          "acctType": "",
          "transactionList": {
            "transaction": [
              {
                "amount": {
                  "curCode": "",
                  "content": ""
                }
            ],
            "oldestTxnDate": ""
          },
          "uniqueId":
        }
  }
  </code></pre>
  
  <p>Expecting a generic way to map the different structured JSON entities to single POJO.</p>