Class GsonGrpcJsonMarshallerBuilder

java.lang.Object
com.linecorp.armeria.common.grpc.GsonGrpcJsonMarshallerBuilder

public final class GsonGrpcJsonMarshallerBuilder extends Object
A builder for creating a new GrpcJsonMarshaller that serializes and deserializes a Message to and from JSON.
  • Method Details

    • jsonParserCustomizer

      public GsonGrpcJsonMarshallerBuilder jsonParserCustomizer(Consumer<? super com.google.protobuf.util.JsonFormat.Parser> jsonParserCustomizer)
      Adds a Consumer that can customize the JsonFormat.Parser used when deserializing a JSON payload into a Message.
    • jsonPrinterCustomizer

      public GsonGrpcJsonMarshallerBuilder jsonPrinterCustomizer(Consumer<? super com.google.protobuf.util.JsonFormat.Printer> jsonPrinterCustomizer)
      Adds a Consumer that can customize the JsonFormat.Printer used when serializing a Message into a JSON payload.
    • build

      public GrpcJsonMarshaller build()
      Returns a newly-created GrpcJsonMarshaller.