C#通过Newtonsoft序列化实现驼峰命名

                    JsonSerializerSettings serializerSettings = new JsonSerializerSettings
                    {
                        ContractResolver = new CamelCasePropertyNamesContractResolver()
                    };
                    JsonConvert.SerializeObject(Object, Formatting.None, serializerSettings);

 

posted @ 2021-09-10 17:42  来瓶冰镇可乐吧  阅读(371)  评论(0编辑  收藏  举报