mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
encoding/json: fix out of phase error unmarshaling non-string into TextUnmarshaler
Fixes #9650. Change-Id: I45b879124691e485b86c1e99a3227032283850d2 Reviewed-on: https://go-review.googlesource.com/12208 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
29f03a37c1
commit
671bddf0b0
2 changed files with 26 additions and 0 deletions
|
|
@ -682,6 +682,7 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool
|
|||
} else {
|
||||
d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
|
||||
}
|
||||
return
|
||||
}
|
||||
s, ok := unquoteBytes(item)
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue