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

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 0.11
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: