Allow ODataUtf8JsonWriter
buffer size to be configurable by the user.
#3100
Labels
ODataUtf8JsonWriter
buffer size to be configurable by the user.
#3100
A customer wants to be able to configure the buffer size of
ODataUtf8JsonWriter
, e.g. increase the buffer size to reduce how frequent stream I/O is invoked. WhileODataUtf8JsonWriter
accepts a buffer size as a constructor parameter, this parameter is not exposed on theIJsonWriterFactory
interface or any of the built-in implementations of that interface.ODataMessageWriter
has aBufferSize
property, but that's only used when using the "older"JsonWriter
.There are some existing design issues that make this feature request less straightforward:
IJsonWriterFactory
methods would be breakingIf the issue #3099 is addressed, a workaround would be for the user to wrap the output stream behind a custom stream implementation that intercepts writes and users a buffer size the user desires, then pass that stream to
ODataMessageWriter
.Assemblies affected
Microsoft.OData.Core
7.x and 8.xReproduce steps
N/A
Expected result
There's no way for the user to configure the ODataUtf8JsonWriter buffer size
Actual result
There should be a way to control the buffer size of
ODataUtf8JsonWriter
The text was updated successfully, but these errors were encountered: