Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2862

Implement round-tripping of BigDecimal values

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • bson-5.0.0
    • Affects Version/s: None
    • Component/s: BSON
    • None

      The goal of this ticket is to be able to do something like:

      Hash.from_bson({a: BigDecimal('42')}.to_bson)
      

      ... and have that return ...

      {a: BigDecimal('42')}
      

      ... as originally composed.

      This might require a global override or flag to make Decimal128 values deserialize into BigDecimal objects (since currently those are deserialized into BSON::Decimal128 objects). We discussed having such an override in a separate file that must be manually `require`d by user applications.

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: