jsonpointer

package
v0.0.0-...-6bf47c7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2015 License: MIT, MIT Imports: 6 Imported by: 0

README

JSON Pointer for go

This is an implementation of JSON Pointer.

Coverage Status

Documentation

Overview

Package jsonpointer implements RFC6901 JSON Pointers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(data []byte, path string) ([]byte, error)

Find a section of raw JSON by specifying a JSONPointer.

func FindDecode

func FindDecode(data []byte, path string, into interface{}) error

FindDecode finds an object by JSONPointer path and then decode the result into a user-specified object. Errors if a properly formatted JSON document can't be found at the given path.

func FindMany

func FindMany(data []byte, paths []string) (map[string][]byte, error)

FindMany finds several jsonpointers in one pass through the input.

func Get

func Get(m map[string]interface{}, path string) interface{}

Get the value at the specified path.

func ListPointers

func ListPointers(data []byte) ([]string, error)

ListPointers lists all possible pointers from the given input.

func Reflect

func Reflect(o interface{}, path string) interface{}

Reflect gets the value at the specified path from a struct.

func ReflectListPointers

func ReflectListPointers(o interface{}) ([]string, error)

ReflectListPointers lists all possible pointers from the given struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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