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

Provide more informative exception on deserialization of invalid type arguments of generic types

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Serialization

      For example, deserializing 

      "\{ \"A\" : { \"_t\" : \"System.Collections.Generic.List`1[[InvalidType, InvalidAssembly]]\", \"_v\" : [{ \"Y\" : 1 }] }}";
      

      to

      public class MyClass
      {
         public object A { get; set; }
      }
      

      Throws "String cannot have zero length.", instead of more informative message.

            Assignee:
            adelin.mbidaowona@mongodb.com Adelin Mbida Owona
            Reporter:
            boris.dogadov@mongodb.com Boris Dogadov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: