JsonArray array = Json.createArrayBuilder().add(Json.createObjectBuilder().add("name", "Bill").build())
.add(Json.createObjectBuilder().add("name", "Monica").build()).build();
array = target.request().post(Entity.json(array), JsonArray.class);
Assert.assertEquals(2, array.size());
JsonObject obj = array.getJsonObject(0);
Assert.assertTrue(obj.containsKey("name"));
Assert.assertEquals(obj.getJsonString("name").getString(), "Bill");
obj = array.getJsonObject(1);
Assert.assertTrue(obj.containsKey("name"));
Assert.assertEquals(obj.getJsonString("name").getString(), "Monica");