jsonpointer: github.com/go-openapi/jsonpointer Index | Files

package jsonpointer

import "github.com/go-openapi/jsonpointer"

Index

Package Files

pointer.go

func Escape Uses

func Escape(token string) string

Escape escapes a pointer reference token string

func GetForToken Uses

func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error)

GetForToken gets a value for a json pointer token 1 level deep

func SetForToken Uses

func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error)

SetForToken gets a value for a json pointer token 1 level deep

func Unescape Uses

func Unescape(token string) string

Unescape unescapes a json pointer reference token string to the original representation

type JSONPointable Uses

type JSONPointable interface {
    JSONLookup(string) (interface{}, error)
}

JSONPointable is an interface for structs to implement when they need to customize the json pointer process

type JSONSetable Uses

type JSONSetable interface {
    JSONSet(string, interface{}) error
}

JSONSetable is an interface for structs to implement when they need to customize the json pointer process

type Pointer Uses

type Pointer struct {
    // contains filtered or unexported fields
}

Pointer the json pointer reprsentation

func New Uses

func New(jsonPointerString string) (Pointer, error)

New creates a new json pointer for the given string

func (*Pointer) DecodedTokens Uses

func (p *Pointer) DecodedTokens() []string

DecodedTokens returns the decoded tokens

func (*Pointer) Get Uses

func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error)

Get uses the pointer to retrieve a value from a JSON document

func (*Pointer) IsEmpty Uses

func (p *Pointer) IsEmpty() bool

IsEmpty returns true if this is an empty json pointer this indicates that it points to the root document

func (*Pointer) Set Uses

func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error)

Set uses the pointer to set a value from a JSON document

func (*Pointer) String Uses

func (p *Pointer) String() string

Pointer to string representation function

Package jsonpointer imports 6 packages (graph) and is imported by 8 packages. Updated 2019-08-03. Refresh now. Tools for package owners.