You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pirk.apache.org by Suneel Marthi <sm...@apache.org> on 2016/07/19 12:34:49 UTC

Replace json-simple with jackson

The project seems to be using json-simple jar for handling JSON.

I see that there's been no releases or activity for json-simple since early
2012 -
https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple

Consider replacing with Jackson Json jar which has a large user base and
community (used by Spark/Flink/Jersey and bunch of other projects) -
https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core


Thoughts ?

Re: Replace json-simple with jackson

Posted by Suneel Marthi <su...@gmail.com>.
Please go ahead and create a Jira for Jackson json.

----------------

Switching Topics: I see that concrete impls are being used throughtout the
project on the LHS of an assignment expression and in method parameters (as
opposed to an interface), for eg:

public static ArrayList<QueryResponseJSON> performQuery(String
queryType, ArrayList<String> selectors, FileSystem fs,


ArrayList<QueryResponseJSON> correctResults = new ArrayList<>();


Any reason for that? Its usually done for performance and optimization
reasons that a concrete imp like ArrayList is

explicitly put on the LHS.



On Wed, Jul 20, 2016 at 3:30 PM, Chris Harris <ch...@gmail.com>
wrote:

> Jackson 2.6 or above sounds good to me.   I'll make a Jira ticket to make
> the switch, and whoever takes it can be mindful of the other versions the
> other dependencies use.
>
> On Wed, Jul 20, 2016 at 10:12 AM, Suneel Marthi <sm...@apache.org>
> wrote:
>
> > Agreed.
> >
> > Pirk is using ElasticSearch 2.x and from my Flink - ElasticSearch 2.x
> > integration experience,  ES 2.x mandates >= Jackson 2.6.x
> >
> > From Pirk's perspective, that shouldn't be an issue since the project
> > doesn't have very many external deps.
> >
> > Guava is a different thing and should be the first thing to be shaded
> out,
> > in large part due to the Hadoop project not upgrading the ancient Guava
> > version in MapReduce for eons. 😏
> > It forced me to learn this thing called 'shading'.
> >
> >
> >
> > On Wed, Jul 20, 2016 at 10:04 AM, Josh Elser <jo...@gmail.com>
> wrote:
> >
> > > Beware conflicting versions of Jackson across projects. I know other
> > > projects struggle. It is probably best for other integrations to shade
> > your
> > > use of Jackson so as to avoid the problem entirely.
> > >
> > >
> > > Ellison Anne Williams wrote:
> > >
> > >> I think that this makes a lot of sense Suneel - thanks for suggesting
> > it!
> > >>
> > >> On Tue, Jul 19, 2016 at 8:34 AM, Suneel Marthi<sm...@apache.org>
> > >> wrote:
> > >>
> > >> The project seems to be using json-simple jar for handling JSON.
> > >>>
> > >>> I see that there's been no releases or activity for json-simple since
> > >>> early
> > >>> 2012 -
> > >>>
> >
> https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
> > >>>
> > >>> Consider replacing with Jackson Json jar which has a large user base
> > and
> > >>> community (used by Spark/Flink/Jersey and bunch of other projects) -
> > >>>
> > >>>
> >
> https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
> > >>>
> > >>>
> > >>> Thoughts ?
> > >>>
> > >>>
> > >>
> >
>

Re: Replace json-simple with jackson

Posted by Chris Harris <ch...@gmail.com>.
Jackson 2.6 or above sounds good to me.   I'll make a Jira ticket to make
the switch, and whoever takes it can be mindful of the other versions the
other dependencies use.

On Wed, Jul 20, 2016 at 10:12 AM, Suneel Marthi <sm...@apache.org> wrote:

> Agreed.
>
> Pirk is using ElasticSearch 2.x and from my Flink - ElasticSearch 2.x
> integration experience,  ES 2.x mandates >= Jackson 2.6.x
>
> From Pirk's perspective, that shouldn't be an issue since the project
> doesn't have very many external deps.
>
> Guava is a different thing and should be the first thing to be shaded out,
> in large part due to the Hadoop project not upgrading the ancient Guava
> version in MapReduce for eons. 😏
> It forced me to learn this thing called 'shading'.
>
>
>
> On Wed, Jul 20, 2016 at 10:04 AM, Josh Elser <jo...@gmail.com> wrote:
>
> > Beware conflicting versions of Jackson across projects. I know other
> > projects struggle. It is probably best for other integrations to shade
> your
> > use of Jackson so as to avoid the problem entirely.
> >
> >
> > Ellison Anne Williams wrote:
> >
> >> I think that this makes a lot of sense Suneel - thanks for suggesting
> it!
> >>
> >> On Tue, Jul 19, 2016 at 8:34 AM, Suneel Marthi<sm...@apache.org>
> >> wrote:
> >>
> >> The project seems to be using json-simple jar for handling JSON.
> >>>
> >>> I see that there's been no releases or activity for json-simple since
> >>> early
> >>> 2012 -
> >>>
> https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
> >>>
> >>> Consider replacing with Jackson Json jar which has a large user base
> and
> >>> community (used by Spark/Flink/Jersey and bunch of other projects) -
> >>>
> >>>
> https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
> >>>
> >>>
> >>> Thoughts ?
> >>>
> >>>
> >>
>

Re: Replace json-simple with jackson

Posted by Suneel Marthi <sm...@apache.org>.
Agreed.

Pirk is using ElasticSearch 2.x and from my Flink - ElasticSearch 2.x
integration experience,  ES 2.x mandates >= Jackson 2.6.x

From Pirk's perspective, that shouldn't be an issue since the project
doesn't have very many external deps.

Guava is a different thing and should be the first thing to be shaded out,
in large part due to the Hadoop project not upgrading the ancient Guava
version in MapReduce for eons. 😏
It forced me to learn this thing called 'shading'.



On Wed, Jul 20, 2016 at 10:04 AM, Josh Elser <jo...@gmail.com> wrote:

> Beware conflicting versions of Jackson across projects. I know other
> projects struggle. It is probably best for other integrations to shade your
> use of Jackson so as to avoid the problem entirely.
>
>
> Ellison Anne Williams wrote:
>
>> I think that this makes a lot of sense Suneel - thanks for suggesting it!
>>
>> On Tue, Jul 19, 2016 at 8:34 AM, Suneel Marthi<sm...@apache.org>
>> wrote:
>>
>> The project seems to be using json-simple jar for handling JSON.
>>>
>>> I see that there's been no releases or activity for json-simple since
>>> early
>>> 2012 -
>>> https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
>>>
>>> Consider replacing with Jackson Json jar which has a large user base and
>>> community (used by Spark/Flink/Jersey and bunch of other projects) -
>>>
>>> https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
>>>
>>>
>>> Thoughts ?
>>>
>>>
>>

Re: Replace json-simple with jackson

Posted by Josh Elser <jo...@gmail.com>.
Beware conflicting versions of Jackson across projects. I know other 
projects struggle. It is probably best for other integrations to shade 
your use of Jackson so as to avoid the problem entirely.

Ellison Anne Williams wrote:
> I think that this makes a lot of sense Suneel - thanks for suggesting it!
>
> On Tue, Jul 19, 2016 at 8:34 AM, Suneel Marthi<sm...@apache.org>  wrote:
>
>> The project seems to be using json-simple jar for handling JSON.
>>
>> I see that there's been no releases or activity for json-simple since early
>> 2012 -
>> https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
>>
>> Consider replacing with Jackson Json jar which has a large user base and
>> community (used by Spark/Flink/Jersey and bunch of other projects) -
>> https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
>>
>>
>> Thoughts ?
>>
>

Re: Replace json-simple with jackson

Posted by Ellison Anne Williams <ea...@gmail.com>.
I think that this makes a lot of sense Suneel - thanks for suggesting it!

On Tue, Jul 19, 2016 at 8:34 AM, Suneel Marthi <sm...@apache.org> wrote:

> The project seems to be using json-simple jar for handling JSON.
>
> I see that there's been no releases or activity for json-simple since early
> 2012 -
> https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
>
> Consider replacing with Jackson Json jar which has a large user base and
> community (used by Spark/Flink/Jersey and bunch of other projects) -
> https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
>
>
> Thoughts ?
>