I use to serialize a complex object with some children anonymous properties with JSON.NET setting : TypenameHandling.All
.
The issue is that since I added more anonymous class on the same assembly the anonymous type name change so I fail miserably when I try to deserialize the previous object.
{
"$type": "System.Collections.Generic.List`1[[System.Object, mscorlib]], mscorlib",
"$values": [
{
"$type": "<>f__AnonymousType2`5[[System.Int32, mscorlib],[System.Boolean, mscorlib],[System.String, mscorlib],[System.Int32, mscorlib],[System.Int32, mscorlib]], GlobalNamespace.Api",
"dashLength": 6,
"inside": true,
"label": "OC",
"lineAlpha": 1,
"value": 100
}
]
}
I cannot use this answer (Deserializing JSON into an object with Json.NET) as I want to recover the previous serialized object and I really need the TypenameHandling.All as I have same classes with same properties.