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

Cannot deserialize floats from json

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.2.4
    • Component/s: BSON
    • None
    • Environment:
      Ubuntu Server 14.04 LTS x64
      Windows 10 Pro x64
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: