Documentation
¶
Overview ¶
Package strictjson is a helper package that provides unambiguous JSON parsing and helper functions for extracting JWS/JWT-specific data types from JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDecodingFailed = errors.New("decoding JSON failed") ErrDuplicateObjectKey = errors.New("duplicate object key encountered") ErrSuperfluousInput = errors.New("unexpected token after JSON input") ErrUnexpectedFailure = errors.New("json.Decoder returned an unexpected result") )
View Source
var ( ErrInvalidType = errors.New("value has invalid type") ErrTimestampOutOfRange = errors.New("encountered an out-of-range timestamp") )
Functions ¶
func Decode ¶
Decode decodes the given JSON input, returning an error when encountering a duplicate object key It doesn't allow trailing input after the expected JSON input. This function has become necessary, as json.Unmarshal silently ignores duplicate keys. It uses the json.Decoder JSON parser.
func ToGenericMap ¶
func ToStringList ¶
func ToTimestamp ¶
Types ¶
This section is empty.