I'm trying to override a JsonConverter<T> in the System.Text.Json package which has an abstract Read method which can be ovveridden as:
public override object Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
(Link to custom serialization here.)
Here ref Utf8JsonReader marks reader as a ref struct. "ref struct" is a feature introduced in 7.2. (which if you're not familiar is a struct that's meant to be used only on the stack. MSDN Link)
In my organization, one of our projects runs on an old compiler that can target only upto C# 6. Is there a way to write MSIL or code in C# 6 that can override the method signature and implement a derivative class of the above signature?
Otherwise you will see the following error: Struct 'System.Text.Json.Utf8JsonReader' is obsolete: Types with embedded references are not supported in this version