title: Pass multiple JSON data in Request Body of Postman and Get into Java Rest API using Jersy(JXRS)
body: <p>I want to get multiple JSON data which I am passing into Postman in Body as Json format.</p>
  
  <p>If I am passing single json data like : "{"firstName":"riya","lastName":"soni"}" so I can get it in my Java API mentioned as below :</p>
  
  <pre><code>@Path("patient")
  @POST
  @Consumes(MediaType.APPLICATION_JSON)
  public String getPatient(Patient patient) {
  System.out.println(patient.getFirstName());
  System.out.println(patient.getLastName());
  return "ok";
  }
  </code></pre>
  
  <p>It is working properly. But if I want to pass data like [{"firstName":"riya","lastName":"soni"},{"firstName":"shreya","lastName":"patel"}]</p>
  
  <p>and getting in API like below :</p>
  
  <pre><code>@Path("patientDetail")
  @POST
  @Consumes(MediaType.APPLICATION_JSON)
  public String getPatientDetails(@RequestBody List&lt;Patient&gt; patient) {
  for (Patient p : patient) {
  System.out.println(p.getFirstName());
  System.out.println(p.getLastName());
  }
  return "ok";
  }
  </code></pre>
  
  <p>When I am hitting request from postman by passing multiple JSON data as I have mentioned, even getPateintDetails method is not calling, how to pass and get multiple json data in Rest API. Please give me the solution or reference link for the same.</p>