type InvalidUTF8Error struct { S string // the whole string value that caused the error }
func (e *InvalidUTF8Error) Error() string
type InvalidUnmarshalError struct { Type reflect.Type }
func (e *InvalidUnmarshalError) Error() string
A MarshalerError represents an error from calling a MarshalJSON or MarshalText method.
type MarshalerError struct { Type reflect.Type Err error // contains filtered or unexported fields }
func ErrMarshaler(typ reflect.Type, err error, msg string) *MarshalerError
func (e *MarshalerError) Error() string
func (e *MarshalerError) Unwrap() error
Unwrap returns the underlying error.
type PathError struct {
// contains filtered or unexported fields
}
func ErrEmptyPath() *PathError
func ErrInvalidPath(msg string, args ...interface{}) *PathError
func (e *PathError) Error() string
A SyntaxError is a description of a JSON syntax error.
type SyntaxError struct { Offset int64 // error occurred after reading Offset bytes // contains filtered or unexported fields }
func ErrExceededMaxDepth(c byte, cursor int64) *SyntaxError
func ErrExpected(msg string, cursor int64) *SyntaxError
func ErrInvalidBeginningOfValue(c byte, cursor int64) *SyntaxError
func ErrInvalidCharacter(c byte, context string, cursor int64) *SyntaxError
func ErrNotAtBeginningOfValue(cursor int64) *SyntaxError
func ErrSyntax(msg string, offset int64) *SyntaxError
func ErrUnexpectedEndOfJSON(msg string, cursor int64) *SyntaxError
func (e *SyntaxError) Error() string
An UnmarshalFieldError describes a JSON object key that led to an unexported (and therefore unwritable) struct field.
Deprecated: No longer used; kept for compatibility.
type UnmarshalFieldError struct { Key string Type reflect.Type Field reflect.StructField }
func (e *UnmarshalFieldError) Error() string
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 Struct string // name of the struct type containing the field Field string // the full path from root node to the field }
func (e *UnmarshalTypeError) Error() string
An UnsupportedTypeError is returned by Marshal when attempting to encode an unsupported value type.
type UnsupportedTypeError struct { Type reflect.Type }
func (e *UnsupportedTypeError) Error() string
type UnsupportedValueError struct { Value reflect.Value Str string }
func (e *UnsupportedValueError) Error() string