jd

package
v0.0.0-...-189b65e Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MULTISET option = "multiset"
	SET      option = "set"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Diff

type Diff []DiffElement

func ReadDiffFile

func ReadDiffFile(filename string, options ...option) (Diff, error)

func ReadDiffString

func ReadDiffString(s string, options ...option) (Diff, error)

func (Diff) Render

func (d Diff) Render() string

type DiffElement

type DiffElement struct {
	Path      Path
	OldValues []JsonNode
	NewValues []JsonNode
}

func (DiffElement) Render

func (d DiffElement) Render() string

type JsonNode

type JsonNode interface {
	Json() string
	Equals(n JsonNode) bool

	Diff(n JsonNode) Diff

	Patch(d Diff) (JsonNode, error)
	// contains filtered or unexported methods
}

func NewJsonNode

func NewJsonNode(n interface{}, options ...option) (JsonNode, error)

func ReadJsonFile

func ReadJsonFile(filename string, options ...option) (JsonNode, error)

func ReadJsonString

func ReadJsonString(s string, options ...option) (JsonNode, error)

type Path

type Path []PathElement

type PathElement

type PathElement interface{}

Jump to

Keyboard shortcuts

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