Open gimmi opened 7 years ago
Is project dead?
An example (partial) stack trace due to this problem happening in Spring controller tests:
org.json.JSONException: Unparsable JSON string: null
at org.skyscreamer.jsonassert.JSONParser.parseJSON(JSONParser.java:56)
at org.skyscreamer.jsonassert.JSONCompare.compareJSON(JSONCompare.java:49)
at org.skyscreamer.jsonassert.JSONCompare.compareJSON(JSONCompare.java:125)
at org.skyscreamer.jsonassert.JSONAssert.assertEquals(JSONAssert.java:415)
at org.skyscreamer.jsonassert.JSONAssert.assertEquals(JSONAssert.java:394)
at org.skyscreamer.jsonassert.JSONAssert.assertEquals(JSONAssert.java:336)
at org.springframework.test.util.JsonExpectationsHelper.assertJsonEqual(JsonExpectationsHelper.java:61)
at org.springframework.test.web.servlet.result.ContentResultMatchers.lambda$json$9(ContentResultMatchers.java:217)
at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:196)
...
The following example:
result in this exception:
but
null
is valid JSON, even at the "root" level according to THIS