Constructor argument with same name as property but different types fails to serialize

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Serialization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

       

      public class A
       {
        public int[] Data { get; }
        public A(IEnumerable<int> data)
        {
          Data = data.ToArray();
        }
       }
      
      
      public class B
      {
        public int[] Data { get; }
        public B(IEnumerable<int> data2)
        {
          Data = data2.ToArray();
        }
      }
      

      A.ToBson() fails while B.ToBson() works.
      Consider same type and name matching in both ImmutableTypeClassMapConvention and NamedParameterCreatorMapConvention

       

            Assignee:
            James Kovacs
            Reporter:
            Boris Dogadov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: