MCPcopy
hub / github.com/tidwall/gjson / TestManyRecursion

Function TestManyRecursion

gjson_test.go:241–254  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

239 }
240}
241func TestManyRecursion(t *testing.T) {
242 var json string
243 var path string
244 for i := 0; i < 100; i++ {
245 json += `{"a":`
246 path += ".a"
247 }
248 json += `"b"`
249 for i := 0; i < 100; i++ {
250 json += `}`
251 }
252 path = path[1:]
253 assert(t, GetMany(json, path)[0].String() == "b")
254}
255func TestByteSafety(t *testing.T) {
256 jsonb := []byte(`{"name":"Janet","age":38}`)
257 mtok := GetBytes(jsonb, "name")

Callers

nothing calls this directly

Calls 3

assertFunction · 0.85
GetManyFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…