]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: documented that ,string applies only to string and numeric fields.
authorCaleb Spare <cespare@gmail.com>
Sun, 6 Jan 2013 22:44:35 +0000 (09:44 +1100)
committerAndrew Gerrand <adg@golang.org>
Sun, 6 Jan 2013 22:44:35 +0000 (09:44 +1100)
Fixes #4437.

R=golang-dev, adg
CC=golang-dev, rsc
https://golang.org/cl/7064045

src/pkg/encoding/json/encode.go

index 83d5ee88b83a6cb8bd2fe3edb173d237a0e85d4f..fb57f1d51b2ccf155d736d44cd6e0caa14e6c936 100644 (file)
@@ -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"`
 //