Class ProtobufJsonFormatHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<com.google.protobuf.Message>
org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter
org.springframework.http.converter.protobuf.ProtobufJsonFormatHttpMessageConverter
- All Implemented Interfaces:
- HttpMessageConverter<com.google.protobuf.Message>
Subclass of 
ProtobufHttpMessageConverter which enforces the use of Protobuf 3 and
 its official library "com.google.protobuf:protobuf-java-util" for JSON processing.
 Most importantly, this class allows for custom JSON parser and printer configurations
 through the JsonFormat utility. If no special parser or printer configuration is
 given, default variants will be used instead.
 
Requires Protobuf 3.x and "com.google.protobuf:protobuf-java-util" 3.x,
 with 3.3 or higher recommended.
- Since:
- 5.0
- Author:
- Juergen Hoeller, Sebastien Deleuze
- See Also:
- 
- JsonFormat.parser()
- JsonFormat.printer()
- ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser, com.google.protobuf.util.JsonFormat.Printer)
 
- 
Field SummaryFields inherited from class org.springframework.http.converter.protobuf.ProtobufHttpMessageConverterDEFAULT_CHARSET, PROTOBUF, X_PROTOBUF_MESSAGE_HEADER, X_PROTOBUF_SCHEMA_HEADERFields inherited from class org.springframework.http.converter.AbstractHttpMessageConverterlogger
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor with default instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, and a default instance ofExtensionRegistry.ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer, com.google.protobuf.ExtensionRegistry extensionRegistry) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.
- 
Method SummaryMethods inherited from class org.springframework.http.converter.protobuf.ProtobufHttpMessageConvertercanWrite, getDefaultContentType, readInternal, supports, supportsRepeatableWrites, writeInternalMethods inherited from class org.springframework.http.converter.AbstractHttpMessageConverteraddDefaultHeaders, canRead, canRead, canWrite, getContentLength, getDefaultCharset, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, writeMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.converter.HttpMessageConvertergetSupportedMediaTypes
- 
Constructor Details- 
ProtobufJsonFormatHttpMessageConverterpublic ProtobufJsonFormatHttpMessageConverter()Constructor with default instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.
- 
ProtobufJsonFormatHttpMessageConverterpublic ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, and a default instance ofExtensionRegistry.
- 
ProtobufJsonFormatHttpMessageConverterpublic ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer, @Nullable com.google.protobuf.ExtensionRegistry extensionRegistry) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.
 
-