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

Cannot deserialize floats from json

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • 2.2.4
    • BSON
    • None
    • Ubuntu Server 14.04 LTS x64
      Windows 10 Pro x64
    • Fully Compatible

    Description

      If you have a RootClass with a SubClass as a child property and it has two float properties then BsonSerializer.Deserialize<TheClass>(json); will throw an error saying that it cannot deserialize the second float. See this gist for re-pro code:

      https://gist.github.com/Ravenheart/0f4f47bbe14737cb01998cf86bf0396d

      This error occurs in ALL versions of the C# driver, including the legacy one.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            Ravenheart Toshko Andreev [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: