作者:fengfeng | 来源:互联网 | 2023-10-13 12:57
设置JsonConvert.DefaultSettings
成功了。
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
Formatting = Formatting.Indented,
TypeNameHandling = TypeNameHandling.Objects,
COntractResolver= new CamelCasePropertyNamesContractResolver()
};