Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2156

GraphSON BigInteger and BigDecimal should use strings

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3.5
    • Fix Version/s: None
    • Component/s: io
    • Labels:

      Description

      Both BigDecimal and BigInteger serialize to JSON numeric as follows:

      {
        "@type" : "gx:BigDecimal",
        "@value" : 123456789987654321123456789987654321
      }
      

      but should probably serialize to a string value instead. Jackson 2.10 should support that option and make it easier for other language variants to handle. Interestingly Jackson 2.9.8 which we are currently on seems to support the consumption of either number or string so it seems likely that this can be done without a significant breaking change. From the point we implement this we can simply say that going forward we will prefer support of a string value.

      As this change would still be breaking to those who consume raw graphson or something, the "breaking" label is added to this ticket.

        Attachments

          Activity

            People

            • Assignee:
              spmallette stephen mallette
              Reporter:
              spmallette stephen mallette
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: