using System; using System.Text.Json; using System.Text.Json.Serialization; namespace Quadarax.Foundation.Core.Json { public class InterfaceConverter : JsonConverter where M : class, I { public override I Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return JsonSerializer.Deserialize(ref reader, options); } public override void Write(Utf8JsonWriter writer, I value, JsonSerializerOptions options) { } } }