标签:resolve property res case 驼峰 首字母 .json sep convert
//json对象命名小驼峰式转换
var json = JsonConvert.SerializeObject(newAccount, Formatting.Indented, new JsonSerializerSettings
{
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
});
Account newAccount2 = JsonConvert.DeserializeObject<Account>(json, new JsonSerializerSettings
{
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
});
标签:resolve property res case 驼峰 首字母 .json sep convert
原文地址:https://www.cnblogs.com/icebutterfly/p/9305806.html