private static HttpData setParametersAndWriteJson(ObjectNode root,
                                                      ServiceRequestContext ctx,
                                                      TranscodingSpec spec) throws JsonProcessingException {
        // Generate path variable name/value map.
        final Map<String, String> resolvedPathVars = populatePathVariables(ctx, spec.pathVariables);

        setParametersToNode(root, resolvedPathVars.entrySet(), spec, true);
        final QueryParams params = ctx.queryParams();
        if (!params.isEmpty()) {
            setParametersToNode(root, params, spec, false);
        }
        return HttpData.wrap(mapper.writeValueAsBytes(root));
    }
Converts the HTTP request to gRPC JSON with the {@link TranscodingSpec}.
grpc/src/main/java/com/linecorp/armeria/server/grpc/HttpJsonTranscodingService.java