From 9073af247d602dff4633710adf90c8b3c1869c45 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 11 Nov 2016 11:06:32 -0500 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Quentin Smith Reviewed-by: Caleb Spare --- src/encoding/json/encode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.48.1