]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: document compact json output in Encoder.Encode
authorSean Liao <sean@liao.dev>
Fri, 12 Jul 2024 19:03:08 +0000 (20:03 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 16 Jul 2024 18:06:21 +0000 (18:06 +0000)
Using the same wording as Compact.

Fixes #67943

Change-Id: I578874f3e917bba1634dd988895e622a5ac78c74
Reviewed-on: https://go-review.googlesource.com/c/go/+/597976
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/encoding/json/stream.go

index 5c98d1de0494e12d08e6a7869d2fa79f9b128ae4..cb61ea721207e82c656aac17ff236d543caf8893 100644 (file)
@@ -194,6 +194,7 @@ func NewEncoder(w io.Writer) *Encoder {
 }
 
 // Encode writes the JSON encoding of v to the stream,
+// with insignificant space characters elided,
 // followed by a newline character.
 //
 // See the documentation for [Marshal] for details about the