Ai
1 Star 1 Fork 0

Auser/HttpClientLite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
JsonSettings.cs 777 Bytes
一键复制 编辑 原始数据 按行查看 历史
Auser 提交于 2025-04-28 13:34 +08:00 . no commit message
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using System.Globalization;
namespace HttpClientLite.Extensions;
/// <summary>
/// json 转换器
/// </summary>
public class JsonSettings
{
/// <summary>
/// 序列化设置
/// </summary>
public static JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),//序列化首字母小写
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
DateParseHandling = DateParseHandling.None,
Converters =
{
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeLocal },
},
};
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/Ausername/HttpClientLite.git
git@gitee.com:Ausername/HttpClientLite.git
Ausername
HttpClientLite
HttpClientLite
master

搜索帮助