标签:convert b2b func str type value cas 样式 nbsp
序列化时 指定Key的处理方式,为驼峰式
CamelCasePropertyNamesContractResolver
//设置序列化时key为驼峰样式
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
settings.Formatting = Formatting.Indented;
string str = JsonConvert.SerializeObject(menus, settings);
C# Newtonsoft.Json JsonSerializerSettings 全局序列化设置
原文地址:https://www.cnblogs.com/94cool/p/9650616.html