diff options
| author | Russ Cox <rsc@golang.org> | 2016-11-11 11:06:32 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2016-11-22 01:32:20 +0000 |
| commit | 9073af247d602dff4633710adf90c8b3c1869c45 (patch) | |
| tree | 91fd19aca57dfd71feb2f9e7cd1110e4c7bf35d9 /src/encoding/json | |
| parent | 6e7e8b0f0d8644b3e1981229d597cf8ac2d898c7 (diff) | |
| download | go-9073af247d602dff4633710adf90c8b3c1869c45.tar.xz | |
encoding/json: document what happens to MarshalText's result
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>
Diffstat (limited to 'src/encoding/json')
| -rw-r--r-- | src/encoding/json/encode.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go index 98a9899502..8f21ddaed9 100644 --- a/src/encoding/json/encode.go +++ b/src/encoding/json/encode.go @@ -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. |
