Documentation ¶
Overview ¶
Package emap provides utility functions for maps
MergeMarshal/MergeUnmarshal are used to serialize/deserialize JSON object map which may have different required/known fields and possibly any number of extra parameters
Index ¶
- Variables
- func MergeMarshal(e interface{}, p map[string]interface{}) ([]byte, error)
- func MergeUnmarshal(data []byte, c Constructor, ext *map[string]interface{}) error
- type Constructor
- type Hmap
- func (h Hmap) Get(name string, t reflect.Type, consume ...bool) (interface{}, error)
- func (h Hmap) GetBuffer(name string, consume ...bool) (buffer.Buffer, error)
- func (h Hmap) GetByteSlice(name string, consume ...bool) ([]byte, error)
- func (h Hmap) GetInt64(name string, consume ...bool) (int64, error)
- func (h Hmap) GetString(name string, consume ...bool) (string, error)
- func (h Hmap) GetStringSlice(name string, consume ...bool) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidJSON = errors.New("invalid JSON")
Functions ¶
func MergeMarshal ¶
func MergeUnmarshal ¶
func MergeUnmarshal(data []byte, c Constructor, ext *map[string]interface{}) error
Types ¶
type Constructor ¶
type Hmap ¶
type Hmap map[string]interface{}
Hmap is used to parse through the JSON object from which to construct the actual JWK's. The only reason this exists is to allow the parser to decide which type of key to create based upon which keys are present in the parsed JSON object
Click to show internal directories.
Click to hide internal directories.