I'm trying to deserialize a collection to class.
It seems that in case one of the fields named Id
, I will get the error:
base {"An error occurred while deserializing the Address property of
class Person.LicenseEntity: Element 'Id' does not match any field or
property of class Person.Address"} System.FormatException
{System.IO.FileFormatException}
However, changing the field name (e.g. to Idd
) in both the class and the collection resolve the problem.
Is it possible that I'm not allowed to use the Id
field?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…