func AssertJsonEqual(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{}) bool {
	t.Helper()
	same, diff := jsonCompare(toBytes(expected), toBytes(actual))
	if same {
		return true
	}

	indent := "\t\t"
	diffIndented := regexp.MustCompile("(?m)^").ReplaceAll([]byte(diff), []byte("\t"+indent))[len(indent)+1:]
	tmpl := "\n\tError:" + indent + "JSON not equal\n\tDiff:" + indent + "%s"
	msg := messageFromMsgAndArgs(msgAndArgs...)
	if len(msg) > 0 {
		t.Errorf(tmpl+"\n\tMessages:"+indent+"%s", diffIndented, msg)
	} else {
		t.Errorf(tmpl, diffIndented)
	}
	return false
}
// assert.Equal for JSON - more accurate comparison, pretty diff
assert.Equal for JSON - more accurate comparison, pretty diff
// assert . Equal for JSON - more accurate comparison pretty diff
func AssertJsonEqual(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{}) bool {
	t.Helper()
	same, diff := jsonCompare(toBytes(expected), toBytes(actual))
	if same {
		return true
	}
	indent := "\t\t"
	diffIndented := regexp.MustCompile("(?m)^").ReplaceAll([]byte(diff), []byte("\t"+indent))[len(indent)+1:]
	tmpl := "\n\tError:" + indent + "JSON not equal\n\tDiff:" + indent + "%s"
	msg := messageFromMsgAndArgs(msgAndArgs...)
	if len(msg) > 0 {
		t.Errorf(tmpl+"\n\tMessages:"+indent+"%s", diffIndented, msg)
	} else {
		t.Errorf(tmpl, diffIndented)
	}
	return false
}
func AssertJsonEqual ( t * testing . T , expected , actual interface { } , msgAndArgs ... interface { } ) bool { t . Helper ( ) same , diff := jsonCompare ( toBytes ( expected ) , toBytes ( actual ) ) if same { return true } indent := " \t \t " diffIndented := regexp . MustCompile ( " " ) . ReplaceAll ( [ ] byte ( diff ) , [ ] byte ( " \t " + indent ) ) [ len ( indent ) + 1 : ] tmpl := " \n \t " + indent + " \n \t " + indent + " " msg := messageFromMsgAndArgs ( msgAndArgs ... ) if len ( msg ) > 0 { t . Errorf ( tmpl + " \n \t " + indent + " " , diffIndented , msg ) } else { t . Errorf ( tmpl , diffIndented ) } return false }
assert.Equal for JSON - more accurate comparison, pretty diff
assert . Equal for JSON - more accurate comparison pretty diff