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

Function TestIssue141

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

Source from the content-addressed store, hash-verified

1898}
1899
1900func TestIssue141(t *testing.T) {
1901 json := `{"data": [{"q": 11, "w": 12}, {"q": 21, "w": 22}, {"q": 31, "w": 32} ], "sql": "some stuff here"}`
1902 assert(t, Get(json, "data.#").Int() == 3)
1903 assert(t, Get(json, "data.#.{q}|@ugly").Raw == `[{"q":11},{"q":21},{"q":31}]`)
1904 assert(t, Get(json, "data.#.q|@ugly").Raw == `[11,21,31]`)
1905}
1906
1907func TestChainedModifierStringArgs(t *testing.T) {
1908 // issue #143

Callers

nothing calls this directly

Calls 3

assertFunction · 0.85
GetFunction · 0.85
IntMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…