Package com.linecorp.armeria.common.grpc
Interface GrpcJsonMarshaller
public interface GrpcJsonMarshaller
A JSON marshaller for gRPC method request or response messages to and from JSON.
-
Method Summary
Modifier and Type Method Description static GrpcJsonMarshallerBuilder
builder()
Returns a newGrpcJsonMarshallerBuilder
.<T> T
deserializeMessage(MethodDescriptor.Marshaller<T> marshaller, InputStream is)
Deserializes a gRPC message from JSON.static GrpcJsonMarshaller
of(ServiceDescriptor serviceDescriptor)
Returns a newly-createdGrpcJsonMarshaller
which serializes and deserializes aMessage
served by the service.<T> void
serializeMessage(MethodDescriptor.Marshaller<T> marshaller, T message, OutputStream os)
Serializes a gRPC message into JSON.
-
Method Details
-
of
Returns a newly-createdGrpcJsonMarshaller
which serializes and deserializes aMessage
served by the service. -
builder
Returns a newGrpcJsonMarshallerBuilder
. -
serializeMessage
<T> void serializeMessage(MethodDescriptor.Marshaller<T> marshaller, T message, OutputStream os) throws IOExceptionSerializes a gRPC message into JSON.- Throws:
IOException
-
deserializeMessage
<T> T deserializeMessage(MethodDescriptor.Marshaller<T> marshaller, InputStream is) throws IOExceptionDeserializes a gRPC message from JSON.- Throws:
IOException
-