jd

package
v0.0.0-...-7f8e014 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diff

type Diff []DiffElement

func ReadDiffFile

func ReadDiffFile(filename string) (Diff, error)

func ReadDiffString

func ReadDiffString(s string) (Diff, error)

func (Diff) Render

func (d Diff) Render() string

type DiffElement

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

func (DiffElement) Render

func (d DiffElement) Render() string

type JsonNode

type JsonNode interface {
	Json(metadata ...Metadata) string
	Equals(n JsonNode, metadata ...Metadata) bool

	Diff(n JsonNode, metadata ...Metadata) Diff

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

func NewJsonNode

func NewJsonNode(n interface{}) (JsonNode, error)

func ReadJsonFile

func ReadJsonFile(filename string) (JsonNode, error)

func ReadJsonString

func ReadJsonString(s string) (JsonNode, error)

type Metadata

type Metadata interface {
	// contains filtered or unexported methods
}
var (
	MULTISET Metadata = multisetMetadata{}
	SET      Metadata = setMetadata{}
)

func Setkeys

func Setkeys(keys ...string) Metadata

Jump to

Keyboard shortcuts

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