Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1969

BsonExtensionMethods.ToJson() lost precision with floating pointer numbers

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.3
    • BSON
    • .NetFX

    Description

      BsonDocument.Parse("{\"price\":8.84}").ToJson()
      

      output:

      "{ \"price\" : 8.8399999999999999 }"
      

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            qaqz111 qaqz111
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: