Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-112 Make C# driver deserialize Doubles and LongNumber(Int64) in MongoDocuments to Int32s
  3. CSHARP-113

Add an attribute to allow you to be more or less strict about deserializing numeric bson types to numeric C# primative types

    • Type: Icon: Sub-task Sub-task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.11
    • Affects Version/s: None
    • Component/s: None
    • None

      The proposed attribute could be applied to numeric properties of classes that are deserialized from Bson Documents It shall allow you to become more strict or less strict about:
      gaining precision
      losing precision
      gaining the ability to have a fractional part
      losing a fractional part
      going from float to decimal
      going from decimal to float (if BSON is amended to allow a fixed point decimal)

      I'll propose the name BsonNumericConversionAttribute, but I am open to a shorter name if it does not reduce the clarity of what it does.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            zippy1981 Justin Dearing
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: