From 396c957a32f094ef0f410235250cf0ed6b8dcf9f Mon Sep 17 00:00:00 2001 From: Caleb Spare Date: Mon, 7 Jan 2013 09:44:35 +1100 Subject: [PATCH] encoding/json: documented that ,string applies only to string and numeric fields. Fixes #4437. R=golang-dev, adg CC=golang-dev, rsc https://golang.org/cl/7064045 --- src/pkg/encoding/json/encode.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkg/encoding/json/encode.go b/src/pkg/encoding/json/encode.go index 83d5ee88b8..fb57f1d51b 100644 --- a/src/pkg/encoding/json/encode.go +++ b/src/pkg/encoding/json/encode.go @@ -75,8 +75,9 @@ import ( // Field int `json:",omitempty"` // // The "string" option signals that a field is stored as JSON inside a -// JSON-encoded string. This extra level of encoding is sometimes -// used when communicating with JavaScript programs: +// JSON-encoded string. It applies only to fields of string, floating point, +// or integer types. This extra level of encoding is sometimes used when +// communicating with JavaScript programs: // // Int64String int64 `json:",string"` // -- 2.48.1