Documentation ¶
Index ¶
- func Escape(token string) string
- func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error)
- func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error)
- func Unescape(token string) string
- type JSONPointable
- type JSONSetable
- type Pointer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetForToken ¶
GetForToken gets a value for a json pointer token 1 level deep
func SetForToken ¶
SetForToken gets a value for a json pointer token 1 level deep
Types ¶
type JSONPointable ¶
JSONPointable is an interface for structs to implement when they need to customize the json pointer process
type JSONSetable ¶
JSONSetable is an interface for structs to implement when they need to customize the json pointer process
type Pointer ¶
type Pointer struct {
// contains filtered or unexported fields
}
Pointer the json pointer reprsentation
func New ¶
New creates a new json pointer for the given string
func (*Pointer) DecodedTokens ¶
DecodedTokens returns the decoded tokens
func (*Pointer) Get ¶
Get uses the pointer to retrieve a value from a JSON document
func (*Pointer) IsEmpty ¶
IsEmpty returns true if this is an empty json pointer this indicates that it points to the root document
func (*Pointer) Set ¶
Set uses the pointer to set a value from a JSON document