MCPcopy Create free account
hub / github.com/PaesslerAG/jsonpath / evaluate

Method evaluate

path.go:66–72  ·  view source on GitHub ↗
(ctx context.Context, parameter interface{})

Source from the content-addressed store, hash-verified

64}
65
66func (p *ambiguousPath) evaluate(ctx context.Context, parameter interface{}) (interface{}, error) {
67 matchs := []interface{}{}
68 p.visitMatchs(ctx, parameter, func(keys []interface{}, match interface{}) {
69 matchs = append(matchs, match)
70 })
71 return matchs, nil
72}
73
74func (p *ambiguousPath) visitMatchs(ctx context.Context, r interface{}, visit pathMatcher) {
75 p.parent.visitMatchs(ctx, r, func(keys []interface{}, v interface{}) {

Callers

nothing calls this directly

Calls 1

visitMatchsMethod · 0.95

Tested by

no test coverage detected