Top Description Fields Constructors Methods
org.springframework.messaging.converter

public Class ProtobufJsonFormatMessageConverter

extends ProtobufMessageConverter
Class Inheritance
Imports
com.google.protobuf.ExtensionRegistry, com.google.protobuf.util.JsonFormat, org.springframework.lang.Nullable

Subclass of ProtobufMessageConverter for use with the official "com.google.protobuf:protobuf-java-util" library for JSON support.

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.

Author
Rossen Stoyanchev
Since
5.2.2

Field Summary

Inherited from org.springframework.messaging.converter.ProtobufMessageConverter:
DEFAULT_CHARSETextensionRegistryPROTOBUF

Constructor Summary

AccessConstructor and Description
public
public
ProtobufJsonFormatMessageConverter(JsonFormat.Parser parser, JsonFormat.Printer printer)

Constructor with given instances of JsonFormat.Parser, JsonFormat.Printer, and a default instance of ExtensionRegistry.

public

Method Summary

Inherited from org.springframework.messaging.converter.ProtobufMessageConverter:
canConvertToconvertFromInternalconvertToInternalsupports

Constructor Detail

ProtobufJsonFormatMessageConverterback to summary
public ProtobufJsonFormatMessageConverter(ExtensionRegistry extensionRegistry)

Constructor with default instances of JsonFormat.Parser, JsonFormat.Printer, and ExtensionRegistry.

ProtobufJsonFormatMessageConverterback to summary
public ProtobufJsonFormatMessageConverter(JsonFormat.Parser parser, JsonFormat.Printer printer)

Constructor with given instances of JsonFormat.Parser, JsonFormat.Printer, and a default instance of ExtensionRegistry.

ProtobufJsonFormatMessageConverterback to summary
public ProtobufJsonFormatMessageConverter(JsonFormat.Parser parser, JsonFormat.Printer printer, ExtensionRegistry extensionRegistry)

Constructor with given instances of JsonFormat.Parser, JsonFormat.Printer, and ExtensionRegistry.