Documentation ¶
Overview ¶
implements incremental json format
Index ¶
- Constants
- func ApplyCommand(data any, command Command, budget int) (any, error)
- func ApplyCommands(data any, commands []Command, budget int) (any, error)
- func CombineFn_ArrayAppend(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
- func CombineFn_Inc(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
- func CombineFn_Max(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
- func CombineFn_Min(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
- func CombineFn_SetUnless(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
- func CompactIJson(fullData []byte, budget int) ([]byte, error)
- func DeepEqual(v1 any, v2 any) bool
- func FormatPath(path Path) string
- func GetPath(data any, path []any) (any, error)
- func MakeBudgetError(errStr string, path Path, index int) error
- func MakePathError(errStr string, path Path, index int) error
- func MakePathTypeError(path Path, index int) error
- func MakeSetTypeError(errStr string, path Path, index int) error
- func NormalizeNumbers(v any) any
- func ParseSimplePath(input string) ([]any, error)
- func SetPath(data any, path Path, value any, opts *SetPathOpts) (any, error)
- func SetPathNoErr(data any, path Path, value any, opts *SetPathOpts) any
- func ValidateAndMarshalCommand(command Command) ([]byte, error)
- func ValidatePath(path any) error
- type A
- type BudgetError
- type CombiningFunc
- type Command
- type M
- type Path
- type PathError
- type SetPathOpts
- type SetTypeError
Constants ¶
View Source
const ( SetCommandStr = "set" DelCommandStr = "del" AppendCommandStr = "append" )
Variables ¶
This section is empty.
Functions ¶
func CombineFn_ArrayAppend ¶
func CombineFn_ArrayAppend(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
func CombineFn_Inc ¶
func CombineFn_Inc(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
func CombineFn_Max ¶
func CombineFn_Max(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
func CombineFn_Min ¶
func CombineFn_Min(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
func CombineFn_SetUnless ¶
func CombineFn_SetUnless(data any, value any, pp pathWithPos, opts SetPathOpts) (any, error)
func FormatPath ¶
func MakePathTypeError ¶
func NormalizeNumbers ¶
func ParseSimplePath ¶
func SetPathNoErr ¶
func SetPathNoErr(data any, path Path, value any, opts *SetPathOpts) any
func ValidatePath ¶
Types ¶
type BudgetError ¶
type BudgetError struct {
Err string
}
func (BudgetError) Error ¶
func (e BudgetError) Error() string
type CombiningFunc ¶
type CombiningFunc func(curValue any, newValue any, pp pathWithPos, opts SetPathOpts) (any, error)
type SetPathOpts ¶
type SetPathOpts struct { Budget int // Budget 0 is unlimited (to set a 0 value, use -1) Force bool Remove bool CombineFn CombiningFunc }
type SetTypeError ¶
type SetTypeError struct {
Err string
}
func (SetTypeError) Error ¶
func (e SetTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.