MCPcopy Create free account
hub / github.com/gavv/httpexpect / Path

Method Path

value.go:168–173  ·  view source on GitHub ↗

Path returns a new Value object for child object(s) matching given JSONPath expression. JSONPath is a simple XPath-like query language. See http://goessner.net/articles/JsonPath/. We currently use https://github.com/yalp/jsonpath, which implements only a subset of JSONPath, yet useful for simple q

(path string)

Source from the content-addressed store, hash-verified

166// user.String().IsEqual("john")
167// }
168func (v *Value) Path(path string) *Value {
169 opChain := v.chain.enter("Path(%q)", path)
170 defer opChain.leave()
171
172 return jsonPath(opChain, v.value, path)
173}
174
175// Schema succeeds if value matches given JSON Schema.
176//

Callers 15

TestValue_PathTypesFunction · 0.95
TestNumber_FailedChainFunction · 0.45
TestString_FailedChainFunction · 0.45
TestCookie_FailedChainFunction · 0.45
TestArray_FailedChainFunction · 0.45
TestBoolean_FailedChainFunction · 0.45
TestValue_FailedChainFunction · 0.45
TestObject_FailedChainFunction · 0.45
TestOAuth2Function · 0.45
TestIrisThingsFunction · 0.45
FastHTTPHandlerFunction · 0.45

Calls 3

jsonPathFunction · 0.85
enterMethod · 0.80
leaveMethod · 0.80

Tested by 15

TestValue_PathTypesFunction · 0.76
TestNumber_FailedChainFunction · 0.36
TestString_FailedChainFunction · 0.36
TestCookie_FailedChainFunction · 0.36
TestArray_FailedChainFunction · 0.36
TestBoolean_FailedChainFunction · 0.36
TestValue_FailedChainFunction · 0.36
TestObject_FailedChainFunction · 0.36
TestOAuth2Function · 0.36
TestIrisThingsFunction · 0.36
createRetryFastHandlerFunction · 0.36