Open
Description
Hi,
It would be helpful to have a is.EqualJSON(a, b string)
function to compare JSON values structurally, ignoring formatting and key order.
Example:
expected := `{"name":"Alice","age":30}`
actual := `{
"age": 30,
"name": "Alice"
}`
is.EqualJSON(expected, actual)
Possible implementation idea
Internally, this could unmarshal both inputs into interface{}
and then use is.Equal
.
If you're open to it, I’d be happy to contribute a PR.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels