MyReader () { return (element, object, queue, virtualFile) -> { if (element.isObject()) { object.setItemsSchema(enqueue(queue, new JsonSchemaObject(virtualFile, getNewPointer("items", object.getPointer())), element)); } else if (element instanceof JsonArrayValueAdapter) { final List<JsonSchemaObject> list = new ArrayList<>(); final List<JsonValueAdapter> values = ((JsonArrayValueAdapter)element).getElements(); for (int i = 0; i < values.size(); i++) { JsonValueAdapter value = values.get(i); if (value.isObject()) { list.add(enqueue(queue, new JsonSchemaObject(virtualFile, getNewPointer("items/"+i, object.getPointer())), value)); } } object.setItemsSchemaList(list); } }; }