From: Russ Cox Date: Wed, 8 Feb 2012 18:48:03 +0000 (-0500) Subject: encoding/json: document buffering X-Git-Tag: weekly.2012-02-14~216 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=49110eaa2203bc59c754bc2534ba11f969e448f6;p=gostls13.git encoding/json: document buffering Fixes #1955. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5643058 --- diff --git a/src/pkg/encoding/json/stream.go b/src/pkg/encoding/json/stream.go index f247639502..7d1cc5f119 100644 --- a/src/pkg/encoding/json/stream.go +++ b/src/pkg/encoding/json/stream.go @@ -19,6 +19,9 @@ type Decoder struct { } // NewDecoder returns a new decoder that reads from r. +// +// The decoder introduces its own buffering and may +// read data from r beyond the JSON values requested. func NewDecoder(r io.Reader) *Decoder { return &Decoder{r: r} }