MCPcopy Index your code
hub / github.com/go-openapi/jsonpointer / JSONSetable

Interface JSONSetable

ifaces.go:32–38  ·  view source on GitHub ↗

JSONSetable is an interface for structs to implement, when they need to customize the json pointer process or want to avoid the use of reflection. # Handling of the RFC 6901 "-" token When a type implementing JSONSetable is the terminal parent of a [Pointer.Set] call, the library passes the raw re

Source from the content-addressed store, hash-verified

30// Implementations are responsible for any in-place mutation: the library does not attempt to rebind
31// the result of JSONSet into a parent container.
32type JSONSetable interface {
33 // JSONSet sets the value pointed at the (unescaped) key.
34 //
35 // The key may be the RFC 6901 "-" token when the pointer targets a slice-like member; see the
36 // interface documentation for details.
37 JSONSet(key string, value any) error
38}
39
40// NameProvider knows how to resolve go struct fields into json names.
41//

Callers 1

setSingleImplFunction · 0.65

Implementers 4

CustomDociface_example_test.go
settableDocpointer_test.go
settableCollpointer_test.go
dashSetterdash_token_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…