]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: doc: Decode only writes to exported fields
authorIan Lance Taylor <iant@golang.org>
Fri, 8 Jan 2016 02:48:42 +0000 (18:48 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 8 Jan 2016 16:15:25 +0000 (16:15 +0000)
Fixes #13867.

Change-Id: I6c0a6c64369681840df60f63036c2eece27de8b8
Reviewed-on: https://go-review.googlesource.com/18394
Reviewed-by: Russ Cox <rsc@golang.org>
src/encoding/json/decode.go

index 099d7f6da53847632d32de9ebadcad50d8244edc..539d952ad68678974ebb1cab0845e5db67998a56 100644 (file)
@@ -37,6 +37,7 @@ import (
 // To unmarshal JSON into a struct, Unmarshal matches incoming object
 // 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.
+// Unmarshal will only set exported fields of the struct.
 //
 // To unmarshal JSON into an interface value,
 // Unmarshal stores one of these in the interface value: