MCPcopy
hub / github.com/dgraph-io/dgraph / EqualJSON

Function EqualJSON

testutil/json.go:33–38  ·  view source on GitHub ↗

EqualJSON compares two JSON objects for equality.

(t *testing.T, want, got string, savepath string, quiet bool)

Source from the content-addressed store, hash-verified

31
32// EqualJSON compares two JSON objects for equality.
33func EqualJSON(t *testing.T, want, got string, savepath string, quiet bool) bool {
34 wantMap := UnmarshalJSON(t, want)
35 gotMap := UnmarshalJSON(t, got)
36
37 return DiffJSONMaps(t, wantMap, gotMap, savepath, quiet)
38}
39
40// UnmarshalJSON unmarshals the given string into a map.
41func UnmarshalJSON(t *testing.T, jsonStr string) map[string]interface{} {

Callers 1

runQueriesFunction · 0.92

Calls 2

UnmarshalJSONFunction · 0.85
DiffJSONMapsFunction · 0.85

Tested by 1

runQueriesFunction · 0.74