jsondiff

package
v0.0.0-...-90ef440 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	ChangeType ChangeType `json:"change_type"`
	JsonPath   []string   `json:"json_path"`
	From       any        `json:"from"`
	To         any        `json:"to"`
}

type ChangeType

type ChangeType int
const (
	ChangeTypeNotSet ChangeType = iota
	ChangeTypeCreate
	ChangeTypeUpdate
	ChangeTypeDelete
	ChangeTypeSchema
)

func (ChangeType) MarshalText

func (ct ChangeType) MarshalText() ([]byte, error)

func (ChangeType) String

func (ct ChangeType) String() string

func (*ChangeType) UnmarshalText

func (ct *ChangeType) UnmarshalText(text []byte) error

type JsonDiffer

type JsonDiffer struct {
	MissingEqualZero bool
	NullEqualZero    bool
	// contains filtered or unexported fields
}

func NewJsonDiffer

func NewJsonDiffer() *JsonDiffer

func (*JsonDiffer) JsonDiff

func (jd *JsonDiffer) JsonDiff(src, dst []byte) ([]Change, error)

func (*JsonDiffer) JsonDiffStr

func (jd *JsonDiffer) JsonDiffStr(src, dst string) ([]Change, error)

Jump to

Keyboard shortcuts

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