diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2014-04-16 22:42:24 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-04-16 22:42:24 -0400 |
commit | 6f25f1d4c901417af1da65e41992d71c30f64f8f (patch) | |
tree | 2b162c01ba92f9532a508b19e177803442f5f5d6 | |
parent | 1d2b71ce83ac66c268985a6a9ddf8f062e71821f (diff) | |
download | go-6f25f1d4c901417af1da65e41992d71c30f64f8f.tar.gz go-6f25f1d4c901417af1da65e41992d71c30f64f8f.zip |
encoding/json: document Encoder will terminate each JSON value with '\n'
Fixes #7767.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/87420043
-rw-r--r-- | src/pkg/encoding/json/stream.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/encoding/json/stream.go b/src/pkg/encoding/json/stream.go index e8d6bd4c2c..1cb289fd84 100644 --- a/src/pkg/encoding/json/stream.go +++ b/src/pkg/encoding/json/stream.go @@ -148,7 +148,8 @@ func NewEncoder(w io.Writer) *Encoder { return &Encoder{w: w} } -// Encode writes the JSON encoding of v to the stream. +// Encode writes the JSON encoding of v to the stream, +// followed by a newline character. // // See the documentation for Marshal for details about the // conversion of Go values to JSON. |