更新时间:2021-09-15 21:59:38
您的JSON实体是一个数组,而不是单个对象.这就是为什么JSON.NET要求您进行反序列化的原因!
Your JSON entity is an array rather than a single object. This is why JSON.NET is crying about your deserialization!
将此JSON反序列化为IEnumerable<T>
,您将解决问题:
Deserialize this JSON as an IEnumerable<T>
and you'll solve your issue:
IEnumerable<CardSet> result = JsonConvert.DeserializeObject<IEnumerable<CardSet>>(jsonText);