🐛 Fixes embedding json loop

This commit is contained in:
2025-08-06 18:07:46 +08:00
parent 4f2e18ca27
commit e85af628bf
2 changed files with 15 additions and 2 deletions

View File

@@ -14,6 +14,13 @@ namespace DysonNetwork.Shared.Proto;
public abstract class GrpcTypeHelper
{
public static readonly JsonSerializerOptions? SerializerOptionsWithIgnore = new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
PropertyNameCaseInsensitive = true,
}.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb);
public static readonly JsonSerializerOptions? SerializerOptions = new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,