encoding/json: document actual behavior for Unmarshal into interface{}

Fixes #4900.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13400044
This commit is contained in:
Russ Cox 2013-09-09 19:11:05 -04:00
parent 7adb42eee4
commit 5d2c3a687c
2 changed files with 42 additions and 3 deletions

View file

@ -38,9 +38,7 @@ import (
// keys to the keys used by Marshal (either the struct field name or its tag),
// preferring an exact match but also accepting a case-insensitive match.
//
// To unmarshal JSON into an interface value, Unmarshal unmarshals
// the JSON into the concrete value contained in the interface value.
// If the interface value is nil, that is, has no concrete value stored in it,
// To unmarshal JSON into an interface value,
// Unmarshal stores one of these in the interface value:
//
// bool, for JSON booleans