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

GraphSON BigInteger and BigDecimal should use strings

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.5
    • None
    • io

    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

            Unassigned Unassigned
            spmallette Stephen Mallette
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: