更新时间:2021-09-15 21:59:08
您的 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
,您将解决您的问题:
Deserialize this JSON as an IEnumerable<T>
and you'll solve your issue:
IEnumerable<CardSet> result = JsonConvert.DeserializeObject<IEnumerable<CardSet>>(jsonText);