diff options
Diffstat (limited to 'src/pkg/json/decode.go')
| -rw-r--r-- | src/pkg/json/decode.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/json/decode.go b/src/pkg/json/decode.go index 71ebd6daf6..b6c575cc84 100644 --- a/src/pkg/json/decode.go +++ b/src/pkg/json/decode.go @@ -128,7 +128,9 @@ func (d *decodeState) unmarshal(v interface{}) (err os.Error) { } d.scan.reset() - d.value(pv.Elem()) + // We decode rv not pv.Elem because the Unmarshaler interface + // test must be applied at the top level of the value. + d.value(rv) return d.savedError } |
