BSON gem - Hash does not honor BSON::Registry

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      There is a `BSON::Registry` which determines how BSON is deserialized. Mongoid has this code:

       

      if allow_decimal128
        BSON::Registry.register(BSON::Decimal128::BSON_TYPE, BSON::Decimal128)
      else
        BSON::Registry.register(BSON::Decimal128::BSON_TYPE, BigDecimal)
      end 

      However, BSON gem does not honor this registry for for Hash, it always deserializes as BSON::Document, even when the registry is set to Hash.

       

            Assignee:
            Unassigned
            Reporter:
            Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: