@Override
    public Object convertRequest(ServiceRequestContext ctx, AggregatedHttpRequest request,
                                 Class<?> expectedResultType,
                                 @Nullable ParameterizedType expectedParameterizedResultType)
            throws Exception {
        if (expectedResultType == BlogPost.class) {
            final JsonNode jsonNode = mapper.readTree(request.contentUtf8());
            final int id = idGenerator.getAndIncrement();
            final String title = stringValue(jsonNode, "title");
            final String content = stringValue(jsonNode, "content");
            return new BlogPost(id, title, content);
        }
        return RequestConverterFunction.fallthrough();
    }
Converts an {@link HttpRequest} to a {@link BlogPost}.
examples/tutorials/rest-api-annotated-service/src/main/java/example/armeria/server/blog/BlogPostRequestConverter.java