Versions in this module Expand all Collapse all v5 v5.9.11 Mar 12, 2025 Changes in this version + var ErrBadJSONDoc = fmt.Errorf("Invalid JSON Document") + var ErrBadJSONPatch = fmt.Errorf("Invalid JSON Patch") v5.9.3 Jan 25, 2025 Changes in this version + var AccumulatedCopySizeLimit int64 = 0 + var ErrExpectedObject = errors.New("invalid value, expected object") + var ErrInvalid = errors.New("invalid state detected") + var ErrInvalidIndex = errors.New("invalid index referenced") + var ErrMissing = errors.New("missing value") + var ErrTestFailed = errors.New("test failed") + var ErrUnknownType = errors.New("unknown object type") + var SupportNegativeIndices bool = true + func CreateMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) + func Equal(a, b []byte) bool + func MergeMergePatches(patch1Data, patch2Data []byte) ([]byte, error) + func MergePatch(docData, patchData []byte) ([]byte, error) + type AccumulatedCopySizeError struct + func NewAccumulatedCopySizeError(l, a int64) *AccumulatedCopySizeError + func (a *AccumulatedCopySizeError) Error() string + type ApplyOptions struct + AccumulatedCopySizeLimit int64 + AllowMissingPathOnRemove bool + EnsurePathExistsOnAdd bool + EscapeHTML bool + SupportNegativeIndices bool + func NewApplyOptions() *ApplyOptions + type ArraySizeError struct + func NewArraySizeError(l, s int) *ArraySizeError + func (a *ArraySizeError) Error() string + type Operation map[string]*json.RawMessage + func (o Operation) From() (string, error) + func (o Operation) Kind() string + func (o Operation) Path() (string, error) + func (o Operation) ValueInterface() (interface{}, error) + type Patch []Operation + func DecodePatch(buf []byte) (Patch, error) + func (p Patch) Apply(doc []byte) ([]byte, error) + func (p Patch) ApplyIndent(doc []byte, indent string) ([]byte, error) + func (p Patch) ApplyIndentWithOptions(doc []byte, indent string, options *ApplyOptions) ([]byte, error) + func (p Patch) ApplyWithOptions(doc []byte, options *ApplyOptions) ([]byte, error) Other modules containing this package github.com/cosmiumdev/json-patch