-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Description
by opennota:
json.Encoder adds trailing newlines after values: http://play.golang.org/p/skOwJv7qZR This behaviour should be documented or removed. I personally do not see why it should work so. From https://code.google.com/p/go/source/browse/src/pkg/encoding/json/stream.go#165 // Terminate each value with a newline. // This makes the output look a little nicer // when debugging, and some kind of space // is required if the encoded value was a number, // so that the reader knows there aren't more // digits coming. e.WriteByte('\n') But the reader will know that without the newline, because numbers will be followed by ',', ']', '}', or EOF, right?