1
0
mirror of https://github.com/golang/go synced 2024-11-23 09:00:04 -07:00

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
This commit is contained in:
Shenghou Ma 2014-04-16 22:42:24 -04:00 committed by Russ Cox
parent 1d2b71ce83
commit 6f25f1d4c9

View 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.