Commit 396c957a authored by Caleb Spare's avatar Caleb Spare Committed by Andrew Gerrand

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
parent 161884d3
......@@ -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"`
//
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment