jsonpatch

package
v0.0.0-...-5fb8a3f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package jsonpatch contains data structures and encoders for JSON Patch (RFC 6902) and JSON Pointers (RFC 6901)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeJSONRefToken

func EncodeJSONRefToken(token string) string

EncodeJSONRefToken encodes a JSON reference token as part of a JSON Pointer (RFC 6901 Section 2)

func PointerFromParts

func PointerFromParts(pathParts []string) string

PointerFromParts returns an encoded JSON Pointer from parts

Types

type JsonPatchOp

type JsonPatchOp struct {
	Operation string      `json:"op"`
	Path      string      `json:"path"` // Technically a JSON Pointer, but called Path in the RFC
	From      string      `json:"from,omitempty"`
	Value     interface{} `json:"value,omitempty"`
}

JsonPatchOp describes a JSON Patch operation (RFC 6902 Section 4)

Jump to

Keyboard shortcuts

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