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
This commit is contained in:
Caleb Spare 2013-01-07 09:44:35 +11:00 committed by Andrew Gerrand
parent 161884d3f4
commit 396c957a32

View 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"`
//