接口请求体属性名小写

This commit is contained in:
liming 蔡
2026-07-16 20:25:59 +08:00
parent aa454c63cc
commit 682de34ff5
7 changed files with 62 additions and 12 deletions
+4
View File
@@ -53,6 +53,9 @@
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NPOI, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.dll</HintPath>
</Reference>
@@ -113,6 +116,7 @@
<Compile Include="EPPlusExcelHelper.cs" />
<Compile Include="ExcelImporter.cs" />
<Compile Include="IniFileHelper.cs" />
<Compile Include="JsonHelper.cs" />
<Compile Include="LogHelper.cs" />
<Compile Include="OpenOfficeXML.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+28
View File
@@ -0,0 +1,28 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JY.Utility
{
public static class JsonHelper
{
private static readonly JsonSerializerSettings _settings = new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
public static string Serialize(object obj)
{
return JsonConvert.SerializeObject(obj, _settings);
}
public static T Deserialize<T>(string json)
{
return JsonConvert.DeserializeObject<T>(json, _settings);
}
}
}
+1
View File
@@ -8,6 +8,7 @@
<package id="Microsoft.Bcl.HashCode" version="1.0.0" targetFramework="net472" />
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="net472" />
<package id="Microsoft.IO.RecyclableMemoryStream" version="3.0.1" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="NPOI" version="2.5.5" targetFramework="net452" />
<package id="Portable.BouncyCastle" version="1.8.9" targetFramework="net452" />
<package id="SharpZipLib" version="1.4.2" targetFramework="net48" />