列表设置JSON序列化问题修复

dev
cjy 3 weeks ago
parent 05f12b53db
commit 53f6b998c3

@ -9,6 +9,7 @@ using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Sys.Dtos;
using Mapster;
using MathNet.Numerics;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using SqlSugar;
@ -132,7 +133,12 @@ namespace DS.WMS.Core.Code.Method
item.Width = req.Width;
}
}
var columnStr = JsonConvert.SerializeObject( new ColumnSetContent { Columns = columns } );
var serializerSettings = new JsonSerializerSettings
{
// 设置为驼峰命名
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
};
var columnStr = JsonConvert.SerializeObject( new ColumnSetContent { Columns = columns }, Formatting.None, serializerSettings);
columnSet.Content = columnStr;

Loading…
Cancel
Save