JSONEq asserts that two JSON strings are equivalent. a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
(expected string, actual string, msgAndArgs ...interface{})
| 888 | // |
| 889 | // a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) |
| 890 | func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { |
| 891 | if h, ok := a.t.(tHelper); ok { |
| 892 | h.Helper() |
| 893 | } |
| 894 | return JSONEq(a.t, expected, actual, msgAndArgs...) |
| 895 | } |
| 896 | |
| 897 | // JSONEqf asserts that two JSON strings are equivalent. |
| 898 | // |