Open eiriktsarpalis opened 4 hours ago
I've refactored the code following Miha's suggestion, but it seems STJ is susceptible to the same issue. Effectively, the buffer is being cleared every time we flush to the underlying stream.
https://github.com/dotnet/runtime/blob/d4516bf13c0a06d955912c15e71a13e3dc894db0/src/libraries/Common/src/System/Text/Json/PooledByteBufferWriter.cs#L108
I'll file an issue.
_Originally posted by @eiriktsarpalis in https://github.com/dotnet/runtime/pull/109832#discussion_r1849009395_
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis See info in area-owners.md if you want to be subscribed.
https://github.com/dotnet/runtime/blob/d4516bf13c0a06d955912c15e71a13e3dc894db0/src/libraries/Common/src/System/Text/Json/PooledByteBufferWriter.cs#L108
I'll file an issue.
_Originally posted by @eiriktsarpalis in https://github.com/dotnet/runtime/pull/109832#discussion_r1849009395_