MyReader () { return (element, object, queue, virtualFile) -> { if (element instanceof JsonArrayValueAdapter) { object.setRequired(new LinkedHashSet<>(((JsonArrayValueAdapter)element).getElements().stream() .filter(notEmptyString()) .map(el -> StringUtil.unquoteString(el.getDelegate().getText())) .collect(Collectors.toList()))); } }; }