public XContentBuilder array(String fieldName, Enum<?>[] array) throws IOException {
        json.writeArrayFieldStart(fieldName);
        for (Enum<?> item : array) {
            json.writeString(item.name());
        }
        json.writeEndArray();
        return this;
    }
@param fieldName
@param array
@throws IOException
manager/api/es/src/main/java/io/apiman/manager/api/es/util/XContentBuilder.java