From 6f25f1d4c901417af1da65e41992d71c30f64f8f Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Wed, 16 Apr 2014 22:42:24 -0400 Subject: [PATCH] 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 --- src/pkg/encoding/json/stream.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkg/encoding/json/stream.go b/src/pkg/encoding/json/stream.go index e8d6bd4c2ce..1cb289fd843 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.