gojsonpointer

package
v0.0.0-...-485d38d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2017 License: MIT, Apache-2.0 Imports: 5 Imported by: 0

README

gojsonpointer

An implementation of JSON Pointer - Go language

References

http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07

Note

The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonPointer

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

func NewJsonPointer

func NewJsonPointer(jsonPointerString string) (JsonPointer, error)

func (*JsonPointer) Get

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

Uses the pointer to retrieve a value from a JSON document

func (*JsonPointer) Set

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

Uses the pointer to update a value from a JSON document

func (*JsonPointer) String

func (p *JsonPointer) String() string

Pointer to string representation function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL