MCPcopy Create free account
hub / github.com/expr-lang/expr / JSONEq

Function JSONEq

internal/testify/require/require.go:1126–1134  ·  view source on GitHub ↗

JSONEq asserts that two JSON strings are equivalent. assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)

(t TestingT, expected string, actual string, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1124//
1125// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
1126func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) {
1127 if h, ok := t.(tHelper); ok {
1128 h.Helper()
1129 }
1130 if assert.JSONEq(t, expected, actual, msgAndArgs...) {
1131 return
1132 }
1133 t.FailNow()
1134}
1135
1136// JSONEqf asserts that two JSON strings are equivalent.
1137//

Calls 3

JSONEqFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…