Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17578

Spring Boot 2.x not converting Protobuf to JSON Using ProtobufJsonFormatHttpMessageConverter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.1.3
    • Fix Version/s: Waiting for Triage
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      I am using ProtobufJsonFormatHttpMessageConverter in Springboot 2.0
      @bean
      ProtobufJsonFormatHttpMessageConverter protobufJsonFormatHttpMessageConverter() {
      JsonFormat.Printer printer = JsonFormat.printer()
      .omittingInsignificantWhitespace();
      JsonFormat.Parser parser = JsonFormat.parser().ignoringUnknownFields();

       

      {{ return new ProtobufJsonFormatHttpMessageConverter(parser,printer,(ExtensionRegistry)null);
      }}}

      While running application, it's not converting output to JSON rather its printing as Protobuf text as below.

      ����Chris�
      Richardson*�
      crichardson@email.com��

        Attachments

          Activity

            People

            Assignee:
            bclozel Brian Clozel
            Reporter:
            brajveer Brajveer Singh
            Last updater:
            Spring Issuemaster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 26 weeks, 1 day ago