title: Parsing JSON with java : dynamic keys
body: <p>I need to create a JSON response with some dynamic fields in java. Here is an example of the JSON response I want to return : </p>
  
  <pre><code>{
      "success": true,
      "completed_at": 1400515821,
      "&lt;uuid&gt;": {
          type: "my_type",
          ...
      }, 
      "&lt;uuid&gt;": {
          type: "my_type",
          ...
      }
  }
  </code></pre>
  
  <p>The "success" and the "completed_at" fields are easy to format. How can I format the  fields? What would be the corresponding java object?</p>
  
  <p>Basically I want to work with 2 java objects : </p>
  
  <pre><code>public class ApiResponseDTO {
  
      private boolean success;
      private DateTime completedAt;
  
      ...
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>public class AuthenticateResponseDTO extends ApiResponseDTO {
  
      public List&lt;ApplianceResponseDTO&gt; uuids = new     ArrayList&lt;ApplianceResponseDTO&gt;();
  
  }
  </code></pre>
  
  <p>These java objects don't correspond to the expected JSON format. It would work if I could change the JSON format to have a list, but I can't change it.</p>
  
  <p>Thanks a lot!</p>