]> Cypherpunks repositories - gostls13.git/commit
encoding/json: report true from v2 Decoder.More when an error is pending
authorDamien Neil <dneil@google.com>
Mon, 8 Dec 2025 21:09:05 +0000 (13:09 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 11 Dec 2025 17:34:26 +0000 (09:34 -0800)
commit00642ee23b614d5314604b6b4d25c671f82c26b2
tree56e7f6b718760d455a62ce31192baaaac780e5db
parent7b60d0673910a6527eb3d401b8a4e90c59cf70bd
encoding/json: report true from v2 Decoder.More when an error is pending

Historically, Decoder.More reports true when the next read will
return an error. Adjust the v2 Decoder to follow this behavior.

Fixes #76467

Change-Id: I03bfa391e4e89ada8ca869db43c1d0bb63cc0413
Reviewed-on: https://go-review.googlesource.com/c/go/+/728300
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/encoding/json/stream_test.go
src/encoding/json/v2_stream.go
src/encoding/json/v2_stream_test.go