Providing JAR for org.json

I was wondering why www.json.org/anyone does not yet provide the official org.json JAR package for download? All the queries that I find ask where they can download the JAR, get answers to the page that lists the source files.

It seems a little cumbersome to expect everyone to download each source file and prepare the JAR file itself.

+8
json jar
source share
5 answers

Do you find using Maven? for example, if you want the JAR to share JSON, you could just include ...

http://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl/1.9.6

<dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <version>1.9.6</version> </dependency> 

in pom.xml, this will give you a jar for JSON.

Or better yet, use org.json one ...

http://mvnrepository.com/artifact/org.json/json

 <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20090211</version> </dependency> 
+14
source share
+1
source share

The implementation from json.org Douglas Crockford is free. Fortunately, there is almost a free replacement (apparently, Googles code packaged by someone else for Maven Central):

 <dependency> <groupId>com.vaadin.external.google</groupId> <artifactId>android-json</artifactId> <version>0.0.20131108.vaadin1</version> </dependency> 

Add this to pom.xml instead of using json.org. To do this, we had to make only one small change for our code: a vaadine can throw JSONException in more places, so we had to either catch them or pass them to the callers (extend the declaration of throws).

+1
source share

Remember that json.org software is open source. In many cases, this leads to downstream problems.

The problem is that the license is essentially a MIT license, but it adds a line stating that the software should only be used forever, not evil. It sounds great, but if you need a corporate lawyer to sign it, it becomes nasty because there is no consensus on the legal definition of "evil." If you use the json.org library, you cannot put your software in Debian, for example. Your software also cannot be a dependency for any Apache project.

To help with this, I adapted and packaged the rewriting of clean rooms in the android library json.org. The source is on github and is licensed by Apache. See https://github.com/tdunning/open-json . To use this, add something similar to your pom (or equivalent):

 <!-- https://mvnrepository.com/artifact/com.tdunning/json --> <dependency> <groupId>com.tdunning</groupId> <artifactId>json</artifactId> <version>1.3</version> </dependency> 

Ping me with exit requests or problems on github or whatever you like.

0
source share

Using com.tdunnning can lead to dependency conflicts, especially if you make your project available to others as a library. The implementation is not 100% compatible with org.json

This package (com.tdunning) was forked at https://github.com/openjson/openjson with the package renamed to com.github.openjson instead of org.json to prevent conflicts.

Maven dependency:

 <dependency> <groupId>com.github.openjson</groupId> <artifactId>openjson</artifactId> <version>1.0.10</version> </dependency> 
0
source share

All Articles