skyscreamer / JSONassert

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

JSONAssert has undeclared dependency on org.json.JSONArray #170

Open sergeykad opened 1 year ago

sergeykad commented 1 year ago

Using JSONAssert library produces the compilation error seen below if 'org.json:json' was not added as a dependency too.

cannot access JSONArray
            JSONAssert.assertEquals(expected, actual,
                      ^
  class file for org.json.JSONArray not found

If 'org.json:json' is required for JSONAssert usage it should be declared as a compilation dependency.

martypitt commented 1 year ago

Just hit this too...

java.lang.NoClassDefFoundError: org/json/JSONException

    at org.skyscreamer.jsonassert.JSONCompare.compareJSON(JSONCompare.java:49)
    at org.skyscreamer.jsonassert.JSONCompare.compareJSON(JSONCompare.java:125)