Hi, just trying to be the devil's advocate :)
Even if it's a small piece of code just for writing JSON, do we really re-invent the wheel again? Don't know if you where aware of, but there is an Apache JSON lib available, and it does have the proper imports/exports ;) Apache Johnzon [1] regards, Achim [1] - http://johnzon.apache.org/ 2017-01-18 14:10 GMT+01:00 Carsten Ziegeler <[email protected]>: > Hi, > > as Jim has explained in [1] we have to remove the usage of the json.org > library from our code base as the licence is not in the excepted > category anymore. This does not affect released code. > > Now, before we get into a discussion about the best json library on > earth, let's reduce the discussion to the webconsole and the plugins first. > If we look at how json.org is used in this code, it is only used for > writing json. No parsing, nothing fancy at all. > > I recently removed the usage of json.org code in the DS web console > plugin and created a simple JSONWriter [2]. And that's actually all we > need in the webconsole and our plugins. > > So my suggestion is: > - we add the writer from [1] to a new package in the web console and > export it. > - plugins can be changed to use that writer and decide whether they just > import that package or simply embed that single class. > > This removes most of the usage with one ugly exception: > The org.apache.felix.webconsole.WebConsoleUtils class is using json.org > directly in its api and WebConsoleUtils is exported api. > > It contains only a small helper method and replacing that usage is very > easy. The method is deprecated for a long time. > > In order to create the least disruption for existing plugins, I suggest we: > - remove that method from the API > - do *not* increase the major version of the API to allow all plugins to > continue to run unless they use the method > > I know that is not following the semantic versioning and might create > problems for existing plugins. But I don't think the method is widely used > > WDYT? > > Regards > Carsten > > [1] > https://mail-archives.apache.org/mod_mbox/www-legal-discuss/201611.mbox/% > [email protected]%3E > [2] > https://svn.apache.org/repos/asf/felix/trunk/webconsole- > plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ > -- > Carsten Ziegeler > Adobe Research Switzerland > [email protected] > > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
