skyscreamer / JSONassert

Write JSON unit tests in less code. Great for testing REST interfaces.
http://jsonassert.skyscreamer.org
Apache License 2.0
992 stars 197 forks source link

Is it possible to make it case INSENSITIVE #184

Closed yhjhoo closed 2 months ago

yhjhoo commented 4 months ago

Is there a feature to compare the json of ignoring field name insensitive

JSONAssert.assertEquals( "{name: test}", "{Name: test}" )

carterpage commented 2 months ago

While some languages handle it differently, JSON is case sensitive. This is true in Crockford's reference implementation and the JSON-RPC spec.

If you really need it, you could write something to force all of your keys to lowercase before running the test.