Skip to content

Commit

Permalink
Change the implementation bundle for org.json to one with a more open…
Browse files Browse the repository at this point in the history
… license.

Use

   com.vaadin.external.google : android-json : 0.0.20131108.vaadin1

which has the Apache License 2.0 license:
http://www.apache.org/licenses/LICENSE-2.0

Add source for org.json.JSONString interface, which is missing from
the above bundle.
  • Loading branch information
David Biesack authored and David Biesack committed Jul 13, 2016
1 parent 0abb532 commit 2f3576c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ Who uses JSONassert?

* * *

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
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>1.3.1-SNAPSHOT</version>
<version>1.4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>JSONassert</name>
Expand Down Expand Up @@ -50,9 +50,9 @@
<!-- For JSONAssert -->
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<version>0.0.20131108.vaadin1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/org/json/JSONString.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.json;

/**
* The JSONString interface allows a toJSONString() method so that a class can change
* the behavior of JSONObject.toString(), JSONArray.toString(), and JSONWriter.value(Object).
* The toJSONString method will be used instead of the default behavior of using the
* Object's toString() method and quoting the result.
*
* @author sasdjb
*
*/
public interface JSONString {

/**
* The toJSONString method allows a class to produce its own JSON
* serialization.
* */
public String toJSONString();

}

0 comments on commit 2f3576c

Please sign in to comment.