]> Cypherpunks repositories - gostls13.git/commit
encoding/json: add struct and field name to UnmarshalTypeError message
authorJirka Daněk <dnk@mail.muni.cz>
Mon, 18 Jan 2016 15:26:05 +0000 (16:26 +0100)
committerRuss Cox <rsc@golang.org>
Wed, 5 Oct 2016 20:28:59 +0000 (20:28 +0000)
commitb9fd510cd00b6aa26e2ea7001a07b90ebf97d2ed
tree6b321a11850520fbb60d0f6048e3ef24808d2850
parentcb986def671cd244e4682a476cff51c4cff2d8f8
encoding/json: add struct and field name to UnmarshalTypeError message

The UnmarshalTypeError has two new fields Struct and Field,
used when constructing the error message.

Fixes #6716.

Change-Id: I67da171480a9491960b3ae81893770644180f848
Reviewed-on: https://go-review.googlesource.com/18692
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/encoding/json/decode.go
src/encoding/json/decode_test.go