You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Guillaume Nodet <gn...@apache.org> on 2019/01/28 14:27:55 UTC

[DISCUSS] Refactoring of org.json.simple

We currently have a problem in master with the json-simple-ordered module.
Fwiw (in case people do not recall), this module is located in
tooling/json-simple-ordered and is a copy of
   https://github.com/fangyidong/json-simple
which has been modified to include a rejected fix for keeping the order
during parsing / serialization.  It's mainly used in:
  * the build tools (apt processor / maven plugins / camel-route-parser)
  * camel-catalog
  * camel-slack

I think there's no reason to maintain a fork of the package, so I'd rather:
  * switch to a different library (there's a very small one in
https://github.com/apache/felix/tree/trunk/utils/src/main/java/org/apache/felix/utils/json
for example)
  * keep that one but refactor and change the package name to own it,
removing deprecated methods and such.

Thoughts ?
-- 
------------------------
Guillaume Nodet

Re: [DISCUSS] Refactoring of org.json.simple

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It sounds good to me.

Regards
JB

On 28/01/2019 15:27, Guillaume Nodet wrote:
> We currently have a problem in master with the json-simple-ordered module.
> Fwiw (in case people do not recall), this module is located in
> tooling/json-simple-ordered and is a copy of
>     https://github.com/fangyidong/json-simple
> which has been modified to include a rejected fix for keeping the order
> during parsing / serialization.  It's mainly used in:
>    * the build tools (apt processor / maven plugins / camel-route-parser)
>    * camel-catalog
>    * camel-slack
> 
> I think there's no reason to maintain a fork of the package, so I'd rather:
>    * switch to a different library (there's a very small one in
> https://github.com/apache/felix/tree/trunk/utils/src/main/java/org/apache/felix/utils/json
> for example)
>    * keep that one but refactor and change the package name to own it,
> removing deprecated methods and such.
> 
> Thoughts ?
> 

Re: [DISCUSS] Refactoring of org.json.simple

Posted by Zoran Regvart <zo...@regvart.com>.
Hi Guillaume,
I'd switch to a different library, less maintenance for us in the future (IMHO)

zoran

On Mon, Jan 28, 2019 at 3:28 PM Guillaume Nodet <gn...@apache.org> wrote:
>
> We currently have a problem in master with the json-simple-ordered module.
> Fwiw (in case people do not recall), this module is located in
> tooling/json-simple-ordered and is a copy of
>    https://github.com/fangyidong/json-simple
> which has been modified to include a rejected fix for keeping the order
> during parsing / serialization.  It's mainly used in:
>   * the build tools (apt processor / maven plugins / camel-route-parser)
>   * camel-catalog
>   * camel-slack
>
> I think there's no reason to maintain a fork of the package, so I'd rather:
>   * switch to a different library (there's a very small one in
> https://github.com/apache/felix/tree/trunk/utils/src/main/java/org/apache/felix/utils/json
> for example)
>   * keep that one but refactor and change the package name to own it,
> removing deprecated methods and such.
>
> Thoughts ?
> --
> ------------------------
> Guillaume Nodet



-- 
Zoran Regvart

Re: [DISCUSS] Refactoring of org.json.simple

Posted by Guillaume Nodet <gn...@apache.org>.
Le lun. 28 janv. 2019 à 16:56, Claus Ibsen <cl...@gmail.com> a écrit :

> Hi
>
> I think the felix parser has the same problem as the json simple, as
> its unordered for the map structure - which is what we require for
> Apache Camel tools. They depend on the current order.
>
> So the felix source code could also be "fixed" by copying it over to
> Apache Camel and change it to use a LinkedHashMap instead of HashMap.
>
>
Yeah, but that does not really help then ;-)

I've refactored to change the package name to org.apache.camel.util.json
and rename the module to camel-util-json.
I've also removed the deprecated classes.
We can investigate now changing the library to one that does what we need
out of the box.


>
>
>
>
> On Mon, Jan 28, 2019 at 3:28 PM Guillaume Nodet <gn...@apache.org> wrote:
> >
> > We currently have a problem in master with the json-simple-ordered
> module.
> > Fwiw (in case people do not recall), this module is located in
> > tooling/json-simple-ordered and is a copy of
> >    https://github.com/fangyidong/json-simple
> > which has been modified to include a rejected fix for keeping the order
> > during parsing / serialization.  It's mainly used in:
> >   * the build tools (apt processor / maven plugins / camel-route-parser)
> >   * camel-catalog
> >   * camel-slack
> >
> > I think there's no reason to maintain a fork of the package, so I'd
> rather:
> >   * switch to a different library (there's a very small one in
> >
> https://github.com/apache/felix/tree/trunk/utils/src/main/java/org/apache/felix/utils/json
> > for example)
> >   * keep that one but refactor and change the package name to own it,
> > removing deprecated methods and such.
> >
> > Thoughts ?
> > --
> > ------------------------
> > Guillaume Nodet
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


-- 
------------------------
Guillaume Nodet

Re: [DISCUSS] Refactoring of org.json.simple

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I think the felix parser has the same problem as the json simple, as
its unordered for the map structure - which is what we require for
Apache Camel tools. They depend on the current order.

So the felix source code could also be "fixed" by copying it over to
Apache Camel and change it to use a LinkedHashMap instead of HashMap.





On Mon, Jan 28, 2019 at 3:28 PM Guillaume Nodet <gn...@apache.org> wrote:
>
> We currently have a problem in master with the json-simple-ordered module.
> Fwiw (in case people do not recall), this module is located in
> tooling/json-simple-ordered and is a copy of
>    https://github.com/fangyidong/json-simple
> which has been modified to include a rejected fix for keeping the order
> during parsing / serialization.  It's mainly used in:
>   * the build tools (apt processor / maven plugins / camel-route-parser)
>   * camel-catalog
>   * camel-slack
>
> I think there's no reason to maintain a fork of the package, so I'd rather:
>   * switch to a different library (there's a very small one in
> https://github.com/apache/felix/tree/trunk/utils/src/main/java/org/apache/felix/utils/json
> for example)
>   * keep that one but refactor and change the package name to own it,
> removing deprecated methods and such.
>
> Thoughts ?
> --
> ------------------------
> Guillaume Nodet



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: [DISCUSS] Refactoring of org.json.simple

Posted by Andrea Cosentino <an...@yahoo.com.INVALID>.
Sounds good now that we are strongly refactoring :-)

--
Andrea Cosentino 
----------------------------------
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1985@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Monday, January 28, 2019, 3:28:08 PM GMT+1, Guillaume Nodet <gn...@apache.org> wrote: 





We currently have a problem in master with the json-simple-ordered module.
Fwiw (in case people do not recall), this module is located in
tooling/json-simple-ordered and is a copy of
  https://github.com/fangyidong/json-simple
which has been modified to include a rejected fix for keeping the order
during parsing / serialization.  It's mainly used in:
  * the build tools (apt processor / maven plugins / camel-route-parser)
  * camel-catalog
  * camel-slack

I think there's no reason to maintain a fork of the package, so I'd rather:
  * switch to a different library (there's a very small one in
https://github.com/apache/felix/tree/trunk/utils/src/main/java/org/apache/felix/utils/json
for example)
  * keep that one but refactor and change the package name to own it,
removing deprecated methods and such.

Thoughts ?
-- 
------------------------
Guillaume Nodet