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

Method Get

pointer.go:59–63  ·  view source on GitHub ↗

Get uses the pointer to retrieve a value from a JSON document. It returns the value with its type as a [reflect.Kind] or an error.

(document any, opts ...Option)

Source from the content-addressed store, hash-verified

57//
58// It returns the value with its type as a [reflect.Kind] or an error.
59func (p *Pointer) Get(document any, opts ...Option) (any, reflect.Kind, error) {
60 o := optionsWithDefaults(opts)
61
62 return p.get(document, o.provider)
63}
64
65// Set uses the pointer to set a value from a data type that represent a JSON document.
66//

Callers 15

ExamplePointer_GetFunction · 0.80
ExampleUseGoNameProviderFunction · 0.80
Example_ifaceFunction · 0.80
Example_structFunction · 0.80
TestEscapingFunction · 0.80
TestFullDocumentFunction · 0.80
TestGetNodeFunction · 0.80
TestArrayFunction · 0.80
TestStructFunction · 0.80

Calls 2

getMethod · 0.95
optionsWithDefaultsFunction · 0.85

Tested by 15

ExamplePointer_GetFunction · 0.64
ExampleUseGoNameProviderFunction · 0.64
Example_ifaceFunction · 0.64
Example_structFunction · 0.64
TestEscapingFunction · 0.64
TestFullDocumentFunction · 0.64
TestGetNodeFunction · 0.64
TestArrayFunction · 0.64
TestStructFunction · 0.64