Documentation ¶
Overview ¶
Package jsonhooks adds hooks that are automatically called before JSON marshaling (PreMarshalJSON) and after JSON unmarshaling (PostUnmarshalJSON). It does not do so recursively.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImplementsPostJSONUnmarshaler ¶
func ImplementsPostJSONUnmarshaler(v interface{}) bool
ImplementsPostJSONUnmarshaler checks for support for the PostUnmarshalJSON post-hook
func ImplementsPreJSONMarshaler ¶
func ImplementsPreJSONMarshaler(v interface{}) bool
ImplementsPreJSONMarshaler checks for support for the PreMarshalJSON pre-hook
Types ¶
type PostJSONUnmarshaler ¶
type PostJSONUnmarshaler interface {
PostUnmarshalJSON() error
}
PostJSONUnmarshaler infers support for the PostUnmarshalJSON post-hook
type PreJSONMarshaler ¶
type PreJSONMarshaler interface {
PreMarshalJSON() error
}
PreJSONMarshaler infers support for the PreMarshalJSON pre-hook
Click to show internal directories.
Click to hide internal directories.