func (p *JsonPointer) Set(document interface{}, value interface{}) (interface{}, error) {
	is := &implStruct{mode: "SET", inDocument: document, setInValue: value}
	p.implementation(is)
	return document, is.outError
}
Uses the pointer to update a value from a JSON document
package gojsonpointer
import (
	"errors"
	"fmt"
	"reflect"
	"strconv"
	"strings"
)
const (
	const_empty_pointer     = ``
	const_pointer_separator = `/`
	const_invalid_start = `JSON pointer must be empty or start with a "` + const_pointer_separator + `"`
)
type implStruct struct {
	mode string  
	inDocument interface{}
	setInValue interface{}
	getOutNode interface{}
	getOutKind reflect.Kind
	outError   error
}
func NewJsonPointer(jsonPointerString string) (JsonPointer, error) {
	var p JsonPointer
	err := p.parse(jsonPointerString)
	return p, err
}
type JsonPointer struct {
	referenceTokens []string
}
func (p *JsonPointer) parse(jsonPointerString string) error {
	var err error
	if jsonPointerString != const_empty_pointer {
		if !strings.HasPrefix(jsonPointerString, const_pointer_separator) {
			err = errors.New(const_invalid_start)
		} else {
			referenceTokens := strings.Split(jsonPointerString, const_pointer_separator)
			for _, referenceToken := range referenceTokens[1:] {
				p.referenceTokens = append(p.referenceTokens, referenceToken)
			}
		}
	}
	return err
}
func (p *JsonPointer) Get(document interface{}) (interface{}, reflect.Kind, error) {
	is := &implStruct{mode: "GET", inDocument: document}
	p.implementation(is)
	return is.getOutNode, is.getOutKind, is.outError
}