@Test public void testGeneralJsonArray() { String json = "[333,444,{\"key\" : \"hello\"},666]"; JsonArray array = Json.toJsonArray(json); Assert.assertThat(array.getInteger(0), is(333)); Assert.assertThat(array.getInteger(1), is(444)); Assert.assertThat(array.getJsonObject(2).getString("key"), is("hello")); Assert.assertThat(array.getInteger(3), is(666)); }