For greater compatibility and reduced size of the final binary, I'd advise to switch to the more popular and better maintained JSON.simple Java library.
If it's not a problem, I could fork the repo, implement those changes myself and later make a pull request.
@mrgame64 Android have default support for org.json and not json.simple. Major user of this lib are of Android Apps only. in my opinion.. its good to keep org.json than json.simple
I'm not familiar with JSON.simple but it looks org.json is more popular and active at least.
json-simple
https://github.com/fangyidong/json-simple
http://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
org.json
https://github.com/douglascrockford/JSON-java
http://mvnrepository.com/artifact/org.json/json
In my opinion, there are a lot more json libraries out there with better performance than org.json. Why don't you just give user raw data (Strings, Streams ...) so we can freely process the response?
@eneim :+1:
That may be cool if users can use any JSON libraries though an adapter.
hi
json.org is not free
see https://wiki.debian.org/qa.debian.org/jsonevil
yes, sure, Android uses json, but this is a drop-in replacement, under Apache 2.0 license
https://android.googlesource.com/platform/libcore/+/master/json
For Fedora each projects which use the original json library become NOT Free
regards
The definitions of "good" and "evil" are highly debatable... why would someone insert such a clause?
@nkzawa What's the reason for not using gson or another json mapper that provides a POJO instead of dictionary lookup?
@fahimk It's widely used, small but enough feature sets for this library. One of the most important reasons was org.json can have any kinds of values like byte[] in JSONObject. gson couldn't do that.
@nkzawa ok that makes sense. How would you recommend converting to a POJO other than converting back to a String first?
@fahimk I don't know other way :(
Most helpful comment
In my opinion, there are a lot more json libraries out there with better performance than org.json. Why don't you just give user raw data (Strings, Streams ...) so we can freely process the response?