I would like to be able to configure/customize the JsonFormat.Printer used by ProtobufJavaUtilSupport in the ProtobufHttpMessageConverter in order to influence the format of the generated JSON. This is currently not possible and requires the reimplementation of the entire MessageConverter.
One possible solution would be to offer another constructor of ProtobufHttpMessageConverter that takes a ProtobufFormatSupport instance as single argument. ProtobufJavaUtilSupport and ProtobufJavaFormatSupport would have to be made public and ProtobufJavaUtilSupport would get an additional constructor with JsonFormat.Parser and JsonFormat.Printer as arguments. The default behaviour could remain the same.
I've introduced a dedicated ProtobufJsonFormatHttpMessageConverter as a subclass of ProtobufHttpMessageConverter, exposing an overloaded constructor with JsonFormat.Parser and JsonFormat.Printer arguments. This requires Protobuf 3.x and protobuf-java-util 3.x since it exposes the specific JsonFormat type from the latter.
The common ProtobufHttpMessageConverter keeps doing the best possible default job on Protobuf 2.6 or 3.x, using protobuf-java-format or protobuf-java-util if present on the classpath but also working without any format library if the standard Protobuf format is sufficient.