解决办法有两种:
第一种:使用对象的字段属性设置JsonProperty来实现(不推荐,因为需要手动的修改每个字段的属性)

public class UserInfo
{
    [JsonProperty("id")]
    public int Id{ set; get; }
    [JsonProperty("userName")]
    public string UserName{ set; get; }
}
View Code

相关文章:

  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-08
  • 2021-11-14
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
相关资源
相似解决方案