aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/json/decode.go')
-rw-r--r--src/encoding/json/decode.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go
index 59d4c7e734..c33b0ada8a 100644
--- a/src/encoding/json/decode.go
+++ b/src/encoding/json/decode.go
@@ -124,11 +124,11 @@ type Unmarshaler interface {
// An UnmarshalTypeError describes a JSON value that was
// not appropriate for a value of a specific Go type.
type UnmarshalTypeError struct {
- Value string // description of JSON value - "bool", "array", "number -5"
Type reflect.Type // type of Go value it could not be assigned to
- Offset int64 // error occurred after reading Offset bytes
+ Value string // description of JSON value - "bool", "array", "number -5"
Struct string // name of the struct type containing the field
Field string // the full path from root node to the field, include embedded struct
+ Offset int64 // error occurred after reading Offset bytes
}
func (e *UnmarshalTypeError) Error() string {
@@ -210,12 +210,12 @@ type errorContext struct {
// decodeState represents the state while decoding a JSON value.
type decodeState struct {
+ scan scanner
+ savedError error
+ errorContext *errorContext
data []byte
off int // next read offset in data
opcode int // last read result
- scan scanner
- errorContext *errorContext
- savedError error
useNumber bool
disallowUnknownFields bool
}