Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,6 @@ Who uses JSONassert?
+ [Shazam](http://www.shazam.com/)
+ [Thucydides](http://thucydides.net/)

* * *

org.json
--------

This implementation uses a clean-room implementation of the org.json
library implemented for the Android system, released under the Apache 2.0 license. See
[com.vaadin.external.google:android-json](http://search.maven.org/#artifactdetails%7Ccom.vaadin.external.google%7Candroid-json%7C0.0.20131108.vaadin1%7Cjar)
That jar does **not** include the org.json.JSONString interface, so a new implementation of that interface is added to this source.

Resources
---------

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
<!-- For JSONAssert -->
<dependencies>
<dependency>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<version>0.0.20131108.vaadin1</version>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20240303</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void testJSONArrayWithNullValueAndJsonObject() throws JSONException {
private JSONArray getJSONArray1() {
JSONArray jsonArray1 = new JSONArray();
jsonArray1.put(1);
jsonArray1.put(null);
jsonArray1.put(JSONObject.NULL);
jsonArray1.put(3);
jsonArray1.put(2);
return jsonArray1;
Expand All @@ -41,7 +41,7 @@ private JSONArray getJSONArray1() {
private JSONArray getJSONArray2() {
JSONArray jsonArray1 = new JSONArray();
jsonArray1.put(1);
jsonArray1.put(null);
jsonArray1.put(JSONObject.NULL);
jsonArray1.put(3);
jsonArray1.put(2);
return jsonArray1;
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/org/skyscreamer/jsonassert/JSONAssertTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,14 @@ public void testAssertEqualsJSONObject2Boolean() throws JSONException {

@Test
public void testAssertEqualsString2JsonComparator() throws IllegalArgumentException, JSONException {
JSONAssert.assertEquals("Message", "{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":1, \"id\":2}}",
JSONAssert.assertEquals("Message", "{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":2}}",
new CustomComparator(
JSONCompareMode.STRICT,
new Customization("entry.id",
new RegularExpressionValueMatcher<Object>("\\d"))
));

performAssertEqualsTestForMessageVerification("{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":1, \"id\":as}}",
performAssertEqualsTestForMessageVerification("{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":as}}",
new CustomComparator(
JSONCompareMode.STRICT,
new Customization("entry.id",
Expand Down Expand Up @@ -626,14 +626,14 @@ public void testAssertNotEqualsJSONObject2Boolean() throws JSONException {

@Test
public void testAssertNotEqualsString2JsonComparator() throws IllegalArgumentException, JSONException {
JSONAssert.assertNotEquals("Message", "{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":1, \"id\":hh}}",
JSONAssert.assertNotEquals("Message", "{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":hh}}",
new CustomComparator(
JSONCompareMode.STRICT,
new Customization("entry.id",
new RegularExpressionValueMatcher<Object>("\\d"))
));

performAssertNotEqualsTestForMessageVerification("{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":1, \"id\":2}}",
performAssertNotEqualsTestForMessageVerification("{\"entry\":{\"id\":x}}", "{\"entry\":{\"id\":2}}",
new CustomComparator(
JSONCompareMode.STRICT,
new Customization("entry.id",
Expand Down