Since the currect version of the System.Text.Json Serializer does not support inherited properties on interfaces I'm looking for the neatest way to mock it's behavior in the Write
method.
Right now I'm calling the Serialize method, e.g.
public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
{
JsonSerializer.Serialize(writer, value, interfaceType, options)
}
but, as mentioned, this does not respect inherited properties. I could easily lookup the interface's properties myself, but what would be the nicest way to write these properties now with all the cases the default Serializer would respect?