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

Cannot deserialize floats from json

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Works as Designed
    • Affects Version/s: 2.2.4
    • Fix Version/s: None
    • Component/s: Bson
    • Labels:
      None
    • Environment:
      Ubuntu Server 14.04 LTS x64
      Windows 10 Pro x64
    • Backwards Compatibility:
      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

            Assignee:
            rstam Robert Stam
            Reporter:
            Ravenheart Toshko Andreev [X] (Inactive)
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: