title: Jackson: How to obtain the list of objects from JSON Request
body: <p>Does anyone know how to get list of objects from JSON request using Jackson annotations? The request, that i think is correct, looks like this:</p>
  
  <pre><code>    {   
      "movieName": "test",
      "actors": [     
          {       
          "name" : "Adam",
          "birthDate" : "20-10-2015"          
          }      
        ]  
      }
  </code></pre>
  
  <p><strong>Actor.java</strong></p>
  
  <pre><code>public class Actor {
      //...
      @JsonProperty(value = "name")
      private String name;
      @JsonProperty(value = "birthDate")
      private String birthDate;
      //...
  
      //getters and setters
  }
  </code></pre>
  
  <p><strong>Movie.java</strong></p>
  
  <pre><code>public class Movie {
      //...
      private String movieName;
      private List&lt;Actor&gt; actors;
      //...
  
      //getters and setters
  }
  </code></pre>
  
  <p>In my resource, i used inner class MovieResource.ResourceBody , which contains information about the request as POJO. Mapping "movieName" goes as i expected, but when i try to map the "actors" node, the response is "Unable to process JSON" with HTML code 400 (Bad Request). Here's the resource code:</p>
  
  <pre><code>    @Path("/movies")
      @Produces("application/json")
      public class MovieResource {
  
          public static class RequestBody {
              public RequestBody() {
              }
  
              public RequestBody(String movieName, List&lt;Actor&gt; actors) {
                  this.movieName = movieName;
                  this.actors = actors;
              }
  
              @JsonProperty("movieName")
              private String movieName;
  
              @JsonProperty(value = "actors")
              private List&lt;Actor&gt; actors;
  
              //getters and setters
          }
  
      //CRUD operations
      }
  </code></pre>
  
  <p>Where's the mistake? I preffer to use Annotations everywhere I can.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><strong>It was all good, i was missing a coma after test , thanks to @peeskillet</strong></p>