]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: document what happens to MarshalText's result
authorRuss Cox <rsc@golang.org>
Fri, 11 Nov 2016 16:06:32 +0000 (11:06 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 22 Nov 2016 01:32:20 +0000 (01:32 +0000)
Fixes #17743.

Change-Id: Ib5afb6248bb060f2ad8dd3d5f78e95271af62a57
Reviewed-on: https://go-review.googlesource.com/33135
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Quentin Smith <quentin@golang.org>
Reviewed-by: Caleb Spare <cespare@gmail.com>
src/encoding/json/encode.go

index 98a98995024fa4944407b6831b8e173992c54fec..8f21ddaed94d1963d0b0b8839e1bcc4fbaf3aee1 100644 (file)
@@ -34,7 +34,7 @@ import (
 // and is not a nil pointer, Marshal calls its MarshalJSON method
 // to produce JSON. If no MarshalJSON method is present but the
 // value implements encoding.TextMarshaler instead, Marshal calls
-// its MarshalText method.
+// its MarshalText method and encodes the result as a JSON string.
 // The nil pointer exception is not strictly necessary
 // but mimics a similar, necessary exception in the behavior of
 // UnmarshalJSON.