|
@@ -63,13 +63,8 @@ public static class EventUtils
|
|
|
private static JsonSerializerOptions SerializationSettings()
|
|
|
{
|
|
|
var settings = Serialization.CreateSerializerSettings();
|
|
|
- settings.TypeInfoResolver = new DefaultJsonTypeInfoResolver
|
|
|
- {
|
|
|
- Modifiers =
|
|
|
- {
|
|
|
- Serialization.WritablePropertiesOnly
|
|
|
- }
|
|
|
- };
|
|
|
+ settings.TypeInfoResolver = (settings.TypeInfoResolver ?? new DefaultJsonTypeInfoResolver())
|
|
|
+ .WithAddedModifier(Serialization.WritablePropertiesOnly);
|
|
|
return settings;
|
|
|
}
|
|
|
|