docs
docs copied to clipboard
Fix GetMoreBytesFromStream to handle final block correctly
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":