[CSHARP-4533] Provide more informative exception on deserialization of invalid type arguments of generic types Created: 17/Feb/23  Updated: 05/Feb/24

Status: In Progress
Project: C# Driver
Component/s: Serialization
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Boris Dogadov Assignee: Adelin Mbida Owona
Resolution: Unresolved Votes: 0
Labels: triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.


Generated at Wed Feb 07 21:48:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.