@Nullable
    @Override
    public String serializeExampleRequest(String serviceName, String methodName,
                                          Object exampleRequest) {
        if (!(exampleRequest instanceof TBase)) {
            return null;
        }

        final TBase<?, ?> exampleTBase = (TBase<?, ?>) exampleRequest;
        try {
            final TSerializer serializer = new TSerializer(ThriftProtocolFactories.text());
            if (legacyTSerializerToString != null) {
                try {
                    return (String) legacyTSerializerToString.invoke(serializer, exampleTBase,
                                                                     StandardCharsets.UTF_8.name());
                } catch (Throwable ex) {
                    throw new IllegalStateException(
                            "Unexpected exception while serializing " + exampleTBase, ex);
                }
            } else {
                // TSerializer.toString(TBase, charset) was removed in Thrift 0.14.0
                return serializer.toString(exampleTBase);
            }
        } catch (TException e) {
            throw new Error("should never reach here", e);
        }
    }
{@link DocServicePlugin} implementation that supports {@link THttpService}s.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/internal/server/thrift/ThriftDocServicePlugin.java