summaryrefslogtreecommitdiff
path: root/src/pkg/json/stream.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/stream.go')
-rw-r--r--src/pkg/json/stream.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/json/stream.go b/src/pkg/json/stream.go
index cb9b16559..f143b3f0a 100644
--- a/src/pkg/json/stream.go
+++ b/src/pkg/json/stream.go
@@ -23,8 +23,8 @@ func NewDecoder(r io.Reader) *Decoder {
return &Decoder{r: r}
}
-// Decode reads the next JSON-encoded value from the
-// connection and stores it in the value pointed to by v.
+// Decode reads the next JSON-encoded value from its
+// input and stores it in the value pointed to by v.
//
// See the documentation for Unmarshal for details about
// the conversion of JSON into a Go value.
@@ -62,6 +62,7 @@ Input:
for {
// Look in the buffer for a new value.
for i, c := range dec.buf[scanp:] {
+ dec.scan.bytes++
v := dec.scan.step(&dec.scan, int(c))
if v == scanEnd {
scanp += i