Uploaded image for project: 'ProtoStream'
  1. ProtoStream
  2. IPROTO-201

Long fields are serialized as text in JSON

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.4.0.Beta2
    • 4.4.0.Beta1
    • None
    • False
    • False

    Description

      A POJO with a Long field like

      @ProtoField(number = 12)
      public Long aField() {
         return aField;
      }
      

      will be rendered by ProtobufUtil.toCanonicalJSON(ctx, marshalled, true) as a String instead of a number:

      {
        "aField": "123"
      }
      

      Attachments

        Activity

          People

            gfernand@redhat.com Gustavo Fernandes (Inactive)
            gfernand@redhat.com Gustavo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: