public static <T> T getFromJSONArray(String text, Class<T> elementClass) {
        try {
            return OBJECT_MAPPER.readValue(text, elementClass);
        } catch (JsonProcessingException e) {
            throw new RuntimeException("getFromJSONArray exception.", e);
        }
    }
@Test
    public void testGetJsonArray() {
        EsRestClient.EsIndex[] esIndices = getFromJSONArray(jsonArray, EsRestClient.EsIndex[].class);
        System.out.println(JSONObject.valueToString(esIndices));
    }