I'm using an open source library that depends on org.json:json:20090211
. Evidently there are some API differences between version 20090211
and whatever version is provided by Android. When I enable ProGuard minimization, I see this warning:
Warning: com.esri.core.geometry.JSONObjectEnumerator: can't find referenced method 'java.lang.String[] getNames(org.json.JSONObject)' in library class org.json.JSONObject
That method is present in the current reference implementation of JSONObject
, so I assume it was added sometime before version 20090211
, as opposed to removed after it, which means the version included in Android is older. I'd like to diff that version against 20090211
and see what needs to be done to make the library that depends on 20090211
compatible with Android.
What version of org.json is included in Android?
(I know I could rename org.json
and change the dependency to the renamed version, but I'd like to avoid that if possible. Such a change is unlikely to be accepted upstream.)
I'm uncertain of this answer, but the Android version may correspond to no official version. This comment appears in the AOSP source for JSONObject
:
// Note: this class was written without inspecting the non-free org.json sourcecode.
The org.json license is identical to the MIT license, with one addition:
The Software shall be used for Good, not Evil.
So perhaps Google considered that clause too restrictive, and felt the need to reimplement org.json
from scratch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With