Documentation ¶
Index ¶
- func AtPathIn(obj interface{}, path []string) (interface{}, error)
- func ExtendPrefix(prefix []string, segment string) []string
- func ExtraneousAnyPaths(prefix []string, before interface{}, after interface{}) [][]string
- func ExtraneousFieldPaths(data map[string]interface{}, parsed interface{}) ([][]string, error)
- func ExtraneousMapPaths(prefix []string, before map[string]interface{}, after interface{}) [][]string
- func ExtraneousSlicePaths(prefix []string, before []interface{}, after interface{}) [][]string
- func FieldValIsEmpty(fieldVal interface{}) bool
- func GetOnlyMapEntry(obj map[string]interface{}) (string, interface{}, error)
- func GetStringEntry(obj map[string]interface{}, key string) (string, error)
- func MarshalMap(source interface{}) (map[string]interface{}, error)
- func UnmarshalMap(data map[string]interface{}, target interface{}) error
- type ExtraneousFieldsError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtendPrefix ¶
func ExtraneousAnyPaths ¶
func ExtraneousFieldPaths ¶
ExtraneousFieldPaths finds paths in "data" that aren't in "parsed" by serializing
"parsed" to a dictionary and recursively comparing its fields to those of "data".
func ExtraneousMapPaths ¶
func ExtraneousSlicePaths ¶
func FieldValIsEmpty ¶
func FieldValIsEmpty(fieldVal interface{}) bool
func GetOnlyMapEntry ¶
GetOnlyMapEntry get the only entry from a map. Error if the map doesn't contain exactly one entry.
func MarshalMap ¶
func UnmarshalMap ¶
Types ¶
type ExtraneousFieldsError ¶
type ExtraneousFieldsError struct {
Paths [][]string
}
func (*ExtraneousFieldsError) Error ¶
func (e *ExtraneousFieldsError) Error() string
Click to show internal directories.
Click to hide internal directories.