🐛 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

@@ -31,7 +31,13 @@ public abstract class EmbeddableBase
public static Dictionary<string, object> ToDictionary(dynamic input)
{
var jsonRaw = JsonSerializer.Serialize(input, GrpcTypeHelper.SerializerOptions);
return JsonSerializer.Deserialize<Dictionary<string, object>>(jsonRaw, GrpcTypeHelper.SerializerOptions);
var jsonRaw = JsonSerializer.Serialize(
input,
GrpcTypeHelper.SerializerOptionsWithIgnore
);
return JsonSerializer.Deserialize<Dictionary<string, object>>(
jsonRaw,
GrpcTypeHelper.SerializerOptionsWithIgnore
);
}
}