Compare commits

...
2 Commits
Author SHA1 Message Date
xrain 4e1b7d4845 update to 9 2025-10-14 02:20:37 +08:00
xrain 71acb35df9 cancle json refrence 2025-08-13 17:28:24 +08:00
3 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -24,10 +24,10 @@ public static class SimApiUtil
/// </summary>
public static JsonSerializerOptions JsonOption => new()
{
ReferenceHandler = ReferenceHandler.Preserve,
// ReferenceHandler = ReferenceHandler.Preserve,
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All),
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
// DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
};
/// <summary>
+1 -1
View File
@@ -14,8 +14,8 @@
<SynchReleaseVersion>false</SynchReleaseVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>5.0.2</PackageVersion>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
-2
View File
@@ -3,7 +3,6 @@ using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;
using Hangfire;
using Hangfire.Console;
using Hangfire.Redis.StackExchange;
@@ -251,7 +250,6 @@ public static class SimApiExtensions
.AddJsonOptions(opt =>
{
opt.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
opt.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve;
});
}