Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Migration from json.org json code to Android re-implementation#271

Closed
eethomas wants to merge 2 commits intoaws:masteraws/aws-sdk-java:masterfrom
eethomas:mastereethomas/aws-sdk-java:masterCopy head branch name to clipboard
Closed

Migration from json.org json code to Android re-implementation#271
eethomas wants to merge 2 commits intoaws:masteraws/aws-sdk-java:masterfrom
eethomas:mastereethomas/aws-sdk-java:masterCopy head branch name to clipboard

Conversation

@eethomas
Copy link

The Android re-implementation of the json.org code was a clean room reimplementation of the APIs in the json.org code. Json.org's licence contains the phrase "The Software shall be used for Good, not Evil." which some have interpreted to be a "field-of-use restriction" incompatible with some open source licenses (including the GPL). This patch removes all code from the json.org codebase and replaces it with the Android-reimplementation (https://apps.fedoraproject.org/packages/android-json-org-java), with a few minor changes to allow compilation with the AWS SDK.

Changes from Android:

  • org.json package renamed to com.amazonaws.util.json
  • Original JSONStringer.java renamed to InternalJSONStringer.java (api not compatible with json.org version but used internally)
  • Created new JSONWriter.java and JSONStringer.java
  • Added JSONException constructor with signature JSONException(Exception cause)
  • Reimplemented the JSONObject.tryGetString() method (not included in Android version)

Evan Thomas added 2 commits September 12, 2014 11:55
 into the com.amazonaws.util.json package to no longer depend on code from json.org, due to licensing issues
@fulghum
Copy link
Contributor

fulghum commented Sep 22, 2014

Hey Evan, thanks for the contribution. We've actually been working on completely removing the json.org code from the SDK. The license is kind of strange, like you mentioned, plus we already have a dependency on Jackson, so we'd like to simplify. Currently there are two places left in the SDK codebase where the json.org code is used: generated request marshaller types, and error response unmarshalling.

I'll sync up with the team, but my gut feeling is we'd probably prefer to spend the time completely removing all use of the json.org interface, instead of switching over to this better Android implementation of the API. It'll probably be a little more effort to get rid of the json.org API use, but might make more sense in the long run.

@manikandanrs
Copy link
Contributor

Hi @eethomas

Thanks for the contribution. But as @fulghum pointed out, we would want to remove the json.org code completely from the SDK and replace it with Jackson.

So closing this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.