You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2017/02/21 09:03:44 UTC

[jira] [Commented] (SLING-6536) Replace JSON implementation derived from org.json code

    [ https://issues.apache.org/jira/browse/SLING-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875635#comment-15875635 ] 

Stefan Seifert commented on SLING-6536:
---------------------------------------

the the felix dev list the thread discussion a "cleanroom implementation" of org.json as part of the android sources:
https://lists.apache.org/thread.html/d11bfb07838831c78232f9cf63d81b5e66ae85f4e2da702ec6f7b2c5@%3Cdev.felix.apache.org%3E

the thread post mentioned this maven artefact:
http://repo1.maven.org/maven2/org/robolectric/android-all/7.1.0_r7-robolectric-0/

the source attachment does not include the sources for the org.json implementation, but the jar file includes them - but only the main package {{org.apache.sling.commons.json}}.
and even in this main package some classes are different (e.g. a classes "JSON" and "JSONStringer" only exists in the android version, the sling version as a class "JSONString" instead - i've not checked if the signature are the same).

> Replace JSON implementation derived from org.json code
> ------------------------------------------------------
>
>                 Key: SLING-6536
>                 URL: https://issues.apache.org/jira/browse/SLING-6536
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>    Affects Versions: Commons JSON 2.0.18
>            Reporter: Stefan Seifert
>            Priority: Critical
>             Fix For: Commons JSON 2.1.0
>
>
> following the discussion in
> https://lists.apache.org/thread.html/ee51bace078681765d5dcfeda1939628ccefb9b4261b1d7f6a56d420@%3Cdev.sling.apache.org%3E
> we have to replace the implementation of all classes in Commons JSON that were derived from the original org.json code.
> the affected packages are
> * [org.apache.sling.commons.json|https://github.com/apache/sling/tree/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json]
> * [org.apache.sling.commons.json.http|https://github.com/apache/sling/tree/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/http]
> * [org.apache.sling.commons.json.io|https://github.com/apache/sling/tree/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/io]
> * [org.apache.sling.commons.json.util|https://github.com/apache/sling/tree/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/util]
> * [org.apache.sling.commons.json.xml|https://github.com/apache/sling/tree/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/xml]
> unfortunately the unit test coverage for those packages is not very high. the main package has a line coverage of 42%, the other packages less than that or no at all.
> although we might encourage modules to switch to a standard JSON implementation a lot of modules inside sling and perhaps much more outside sling depend on this json implementation, so we should try to keep the exported API and functionality.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)