diff --git a/src/OptionalValues/OptionalValueJsonConverterAttribute.cs b/src/OptionalValues/OptionalValueJsonConverterAttribute.cs index 0cfbd9c..0091b53 100644 --- a/src/OptionalValues/OptionalValueJsonConverterAttribute.cs +++ b/src/OptionalValues/OptionalValueJsonConverterAttribute.cs @@ -40,13 +40,7 @@ protected OptionalValueJsonConverterAttribute() { JsonConverter innerConverter = CreateInnerConverter(); - return (JsonConverter?)Activator.CreateInstance( - type: typeof(OptionalValueJsonConverterFactory), - bindingAttr: BindingFlags.NonPublic | BindingFlags.Instance, - args: [innerConverter], - binder: null, - culture: null - ); + return new OptionalValueJsonConverterFactory(innerConverter); } ///