(Edit by @GrabYourPitchforks: proposed API is in a comment at https://github.com/dotnet/corefx/issues/39483#issuecomment-557737022.)
System.Text.Json specifically supports UTF8 inputs and outputs. MVC needs to support arbitrary user configured encoding schemes. To support this in a performant way, MVC has transcoding Stream implementations that minimally buffer inputs and outputs to the serializer.
Most of the work in these implementations is to perform state management when calling Utf8.FromUtf16 \ Encoders * Decoders. It would be great if these APIs were instead available as part of CoreFx.
(Edit by @GrabYourPitchforks: proposed API is in a comment at https://github.com/dotnet/corefx/issues/39483#issuecomment-557737022.)
System.Text.Json specifically supports UTF8 inputs and outputs. MVC needs to support arbitrary user configured encoding schemes. To support this in a performant way, MVC has transcoding
Streamimplementations that minimally buffer inputs and outputs to the serializer.Most of the work in these implementations is to perform state management when calling
Utf8.FromUtf16\Encoders*Decoders. It would be great if these APIs were instead available as part of CoreFx.