]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: document Encoder will terminate each JSON value with '\n'
authorShenghou Ma <minux.ma@gmail.com>
Thu, 17 Apr 2014 02:42:24 +0000 (22:42 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 17 Apr 2014 02:42:24 +0000 (22:42 -0400)
Fixes #7767.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/87420043

src/pkg/encoding/json/stream.go

index e8d6bd4c2ce00a4f4ed7bbb1e7dc647b4db66b9e..1cb289fd84317679b7247a767a65e21cbd8ec76c 100644 (file)
@@ -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.