diff options
| author | Tuo Shan <shantuo@google.com> | 2017-02-06 18:06:40 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2017-02-10 13:39:10 +0000 |
| commit | 4fafc843a27940c76f43d0d897d918dab2efd529 (patch) | |
| tree | 75d3d6c1039770e20762182e0305f2c6c1d6d778 /src/encoding/json/decode.go | |
| parent | a335c344fac8501ecdf49a0654d1701fb48efe61 (diff) | |
| download | go-4fafc843a27940c76f43d0d897d918dab2efd529.tar.xz | |
encoding/json: clarify documention for Unmarshal into a pointer.
Fixes #18730.
Change-Id: If3ef28e62f7e449d4c8dc1dfd78f7d6f5a87ed26
Reviewed-on: https://go-review.googlesource.com/36478
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/encoding/json/decode.go')
| -rw-r--r-- | src/encoding/json/decode.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go index 77fc4607db..c815599cd5 100644 --- a/src/encoding/json/decode.go +++ b/src/encoding/json/decode.go @@ -22,7 +22,8 @@ import ( ) // Unmarshal parses the JSON-encoded data and stores the result -// in the value pointed to by v. +// in the value pointed to by v. If v is nil or not a pointer, +// Unmarshal returns an InvalidUnmarshalError. // // Unmarshal uses the inverse of the encodings that // Marshal uses, allocating maps, slices, and pointers as necessary, |
