示例代码:
string jsonString = "{\"name\":\"John\", \"age\":30}";
using Newtonsoft.Json;
string jsonString = "{\"name\":\"John\", \"age\":30}";
var person = JsonConvert.DeserializeObject(jsonString);
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
上一篇:ASP.NETCoreWebAPI-在Core-6中Swagger中JSONIgnore无效
下一篇:ASP.NETCoreWebAPI-在验证服务描述符ServiceType:IAccountBalanceServiceLifetime时出现错误