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
- func (p *Pointer) DecodedTokens() []string
- func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error)
- func (p *Pointer) IsEmpty() bool
- func (p Pointer) MarshalJSON() ([]byte, error)
- func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error)
- func (p *Pointer) String() string
- func (p *Pointer) UnmarshalJSON(b []byte) error
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 representation
func Parse ¶
Parse creates a new json pointer for the given string.
Parse is slightly more generous in what it accepts compared to New. The latter will error, iff, jsonPointerString starts with a `/`.
func (*Pointer) DecodedTokens ¶
DecodedTokens returns the decoded tokens
func (*Pointer) IsEmpty ¶
IsEmpty returns true if this is an empty json pointer this indicates that it points to the root document