diff --git a/API/Utils/OneWayPolymorphicJsonConverter.cs b/API/Utils/OneWayPolymorphicJsonConverter.cs index 3031c8a6..0e715551 100644 --- a/API/Utils/OneWayPolymorphicJsonConverter.cs +++ b/API/Utils/OneWayPolymorphicJsonConverter.cs @@ -5,8 +5,11 @@ namespace OpenShock.API.Utils; public class OneWayPolymorphicJsonConverter : JsonConverter { - public override bool CanConvert(Type typeToConvert) => false; - + public override bool CanConvert(Type typeToConvert) + { + return typeof(G) == typeToConvert; //.IsAssignableFrom(typeToConvert); + } + public override G Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => throw new NotSupportedException();