json

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeJSON

func EncodeJSON(kvalues map[string]tdtl.Node) ([]byte, error)

func EncodeJSONZ

func EncodeJSONZ(kvalues map[string]tdtl.Node) ([]byte, error)

func IsReversedOp

func IsReversedOp(op string) bool

func IsValidPath

func IsValidPath(path string) bool

func NewNode

func NewNode(dataType jsonparser.ValueType, value []byte) tdtl.Node

func Patch

func Patch(destNode, srcNode tdtl.Node, path string, op PatchOp) (tdtl.Node, error)

Types

type PatchOp

type PatchOp int
const (
	OpUndef PatchOp = iota
	OpAdd
	OpTest
	OpCopy
	OpMove
	OpRemove
	OpReplace
)

reference: https://datatracker.ietf.org/doc/html/rfc6902 . implement [ add, remove, replace ], reversed [ copy, move, test ].

func NewPatchOp

func NewPatchOp(op string) PatchOp

func (PatchOp) String

func (po PatchOp) String() string

Jump to

Keyboard shortcuts

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