class FieldExtractor {

    public Optional<String> extractOptionalField(HttpServletRequest request, String fieldName) {
        try {
            return xs2aObjectMapper.toJsonField(request.getInputStream(), fieldName, new TypeReference<String>() {
            });
        } catch (IOException e) {
            return Optional.empty();
        }
    }

}