]> Cypherpunks repositories - gostls13.git/commit
encoding/json: add Decoder.Buffered accessor to get overread data
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 29 Jan 2013 00:31:46 +0000 (16:31 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 29 Jan 2013 00:31:46 +0000 (16:31 -0800)
commit91e99c13457109e3571767cae3fc56c472bdd7dc
tree78d92bd33da4575f4df76288b98e24db0b3c2196
parent55cac5395215c04a6a3c7daf1ede241335da0822
encoding/json: add Decoder.Buffered accessor to get overread data

Otherwise it's impossible to know how much data from the
json.Decoder's underlying Reader was actually consumed.

The old fix from golang.org/issue/1955 just added docs. This
provides an actual mechanism.

Update #1955

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/7181053
src/pkg/encoding/json/stream.go
src/pkg/encoding/json/stream_test.go