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

Function TestIssue55

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

Source from the content-addressed store, hash-verified

1208}
1209
1210func TestIssue55(t *testing.T) {
1211 json := `{"one": {"two": 2, "three": 3}, "four": 4, "five": 5}`
1212 results := GetMany(json, "four", "five", "one.two", "one.six")
1213 expected := []string{"4", "5", "2", ""}
1214 for i, r := range results {
1215 if r.String() != expected[i] {
1216 t.Fatalf("expected %v, got %v", expected[i], r.String())
1217 }
1218 }
1219}
1220func TestIssue58(t *testing.T) {
1221 json := `{"data":[{"uid": 1},{"uid": 2}]}`
1222 res := Get(json, `data.#[uid!=1]`).Raw

Callers

nothing calls this directly

Calls 2

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…