docs icon indicating copy to clipboard operation
docs copied to clipboard

Fix GetMoreBytesFromStream to handle final block correctly

Open janos-laszlo opened this issue 1 month ago • 2 comments

I encountered some problems while using this code. The buffer has to be resized on the final block to have the exact length of the remaining JSON, otherwise the reader will read any leftover and throw an exception. For example it can happen that the buffer is: "High": 60, "Low": 20 } }, "Summary": "Hot" }10 }, "Hot": there is leftover after the end object, when the reader reaches '10' it throws with 'unexpected token': 10 }, "Hot":

janos-laszlo avatar Nov 07 '25 22:11 janos-laszlo