The method JsonSlurper.parse(Reader) throws the following exception:
if the reader does not always fill the complete char buffer at the method:
but returns a value < len on certain points.
I have provided a test case at
A standard use case where this exception occurs:
if you use a http-builder with JSON contentType where the server returns the response chunked (Transfer-Encoding: chunked). The InputStreamReader of the apache http client does not fill the complete char buffer at chunk borders.