INNER CODE UNIT · C#

JsonEventSerializer

mizrael/SuperSafeBank · src/SuperSafeBank.Common/JsonEventSerializer.cs:12

public class JsonEventSerializer : IEventSerializer
{
    private readonly IEnumerable<Assembly> _assemblies;
    private ConcurrentDictionary<string, Type> _typesCache = new();
    
    private static readonly JsonSerializerOptions _serializerOptions = new ()
    {
        IgnoreReadOnlyFields = false,
        IgnoreReadOnlyProperties = false,
        IncludeFields = true,
    };

    private static readonly Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings = new Newtonsoft.Json.JsonSerializerSettings()
    {
        ConstructorHandling = Newtonsoft.Json.ConstructorHandling.AllowNonPublicDefaultConstructor,
        ContractResolver = new PrivateSetterContractResolver()
    };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…