Documentation ¶
Overview ¶
Package json is forked from the Go standard library to enable us to find the field of a struct that a given JSON key maps to.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupPatchMetadataForStruct ¶
func LookupPatchMetadataForStruct(t reflect.Type, jsonField string) ( elemType reflect.Type, patchStrategies []string, patchMergeKey string, e error)
Finds the patchStrategy and patchMergeKey struct tag fields on a given struct field given the struct type and the JSON name of the field. It returns field type, a slice of patch strategies, merge key and error. TODO: fix the returned errors to be introspectable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.