我收到了来自服务器的下一个响应 -
我将尝试以以下方式对其进行反序列化 -
{"response":[{"uid":174952xxxx,"first_name":"xxxx","last_name":"xxx"}]}
我将尝试以以下方式对其进行反序列化 -
JsonConvert.DeserializeObject<T>(json);
我的 T 是 VkUser 的列表,但是出现了错误。
[JsonObject]
public class VkUser
{
[JsonProperty("uid")]
public string UserId { get; set; }
[JsonProperty("first_name")]
public string FirstName { get; set; }
[JsonProperty("last_name")]
public string LastName { get; set; }
}
我一直尝试着
,这句话的翻译。public class SomeDto // maybe Response as class name will fix it but I don't want such name
{
public List<VkUser> Users {get;set;}
}
哪些反序列化选项可以帮助我?