Context

There is now a decision from the ASF VP Legal to move the JSON library to "Category X" and therefore forbid its inclusion in released. It's a good opportunity for us to evaluate another, more mainstream, JSON library.

Affected modules

As of r1771785, the following modules declare a dependency on org.json or - in the case of commons.long - embed source code from it

  • bundles/commons/json
  • bundles/commons/log-webconsole
  • bundles/commons/metrics
  • launchpad/builder
  • contrib/extensions/slf4j-mdc
  • tooling/ide/impl-resource-test

Candidates

Apache Johnzon

Home page: http://johnzon.apache.org/

Cons:

GSON

Home page: https://github.com/google/gson

Jackson

Home page: https://github.com/FasterXML/jackson

JSON-P RI

Home page: https://jsonp.java.net/

Cons:

Open JSON

Actually a clean room implementation of the org.json API taken from the Android project.

Home page: https://github.com/tdunning/open-json

Cons:

  • Is not OSGi ready
  • I think it uses the same package names as the original json.org library, we also do that and ours has slightly different behavior, the whole thing might get more confusing than just switching to something else.
  • No labels