newtonsoft json.net 禁用科学计数法

M F*_*M F 10 scientific-notation json.net

我希望我的 webapi 使用驼峰命名法序列化 json。所以我将以下内容添加到 Global.asax 中。

        HttpConfiguration config = GlobalConfiguration.Configuration;
        config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
        config.Formatters.JsonFormatter.UseDataContractJsonSerializer = false;
Run Code Online (Sandbox Code Playgroud)

我注意到,因为我将 UseDataContractJsonSerializer 设置为 false,所以使用科学记数法对大小数进行序列化。我如何保留驼峰命名法并同时禁用科学记数法?

谢谢