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

when using inherentence of classes and hiding class members a serialization exception occurs with duplicate property name

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 2.7.3
    • BSON
    • None
    • c#, windows, server running mongo atlas

    Description

      if you have nested classes that need to be overriden you normally will use the keyword new to hide base properties. But if you do that the serializer complains about duplicate property names. The message it gives is correct but in the supplied case this is not a problem but the intention todo so. Sample and details are in stackoverflow

      https://stackoverflow.com/questions/55069966/bson-does-not-serialize-with-new-overridden-attributes-and-reports-duplicate-u

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            martien.poels_cashflows.com Martien Poels
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: