You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2014/03/10 05:06:25 UTC

Dependency on json-simple in oak-core

Currently oak-core has a dependency on
com.googlecode.json-simple:json-simple:1.1.1 jar. Looking at compile
time usage I see it being referred only from RDBDocumentStore

Would it be possible to use classes from
'org.apache.jackrabbit.oak.commons.json' package and remove the
required dependency on this library

Chetan Mehrotra

Re: Dependency on json-simple in oak-core

Posted by Thomas Mueller <mu...@adobe.com>.
Hi,

> the JSON support doesn't appear to support data types...
>(JsonObject.getProperties returns a String/String map).

Yes, if you need data types, then json.org sounds good to me. But please
note the JSON data types are not "good enough" to encode JCR and Oak
properties. For example PropertyType.DOUBLE can not be represented as a
JSON double, as some values can't be represented.

> and org.apache.jackrabbit.oak.commons.json does not only seem to
>introduce a "JSOP" dependency


It supports JSOP, which is needed by the MicroKernel API, but it's not a
dependency (to an external jar file).


org.apache.jackrabbit.oak.commons.json is still used, for example in the
Document storage. I assume that is as fast or faster than json.org, and it
is well tested. I don't see an urgent reason to remove it.


Regards,
Thomas






On 10/03/14 15:12, "Chetan Mehrotra" <ch...@gmail.com> wrote:

>Looking at its widespread usage I think its correct and maintained. So
>+1 for json.org
>Chetan Mehrotra
>
>
>On Mon, Mar 10, 2014 at 6:47 PM, Julian Reschke <ju...@gmx.de>
>wrote:
>> On 2014-03-10 13:58, Chetan Mehrotra wrote:
>>>>
>>>> and org.apache.jackrabbit.oak.commons.json does not only seem to
>>>> introduce a "JSOP" dependency (aren't we getting rid of that?), but
>>>>also the
>>>> JSON support doesn't appear to support data types...
>>>> (JsonObject.getProperties returns a String/String map).
>>>
>>>
>>> In that case can we use the JSON library from json.org as thats widely
>>> used in projects like Sling Felix WebConsole already. So we would not
>>> be adding a new dependency there
>>> Chetan Mehrotra
>>
>>
>> FWIW, we the oak-blob POM also references json-simple, but it doesn't
>>appear
>> to be used.
>>
>> I really don't care what JSON lib we use, but it needs to be correct,
>> maintained, and fast. If json.org fulfills these requirements then I'm
>>more
>> than happy to switch.
>>
>> Best regards, Julian
>>


Re: Dependency on json-simple in oak-core

Posted by Chetan Mehrotra <ch...@gmail.com>.
Looking at its widespread usage I think its correct and maintained. So
+1 for json.org
Chetan Mehrotra


On Mon, Mar 10, 2014 at 6:47 PM, Julian Reschke <ju...@gmx.de> wrote:
> On 2014-03-10 13:58, Chetan Mehrotra wrote:
>>>
>>> and org.apache.jackrabbit.oak.commons.json does not only seem to
>>> introduce a "JSOP" dependency (aren't we getting rid of that?), but also the
>>> JSON support doesn't appear to support data types...
>>> (JsonObject.getProperties returns a String/String map).
>>
>>
>> In that case can we use the JSON library from json.org as thats widely
>> used in projects like Sling Felix WebConsole already. So we would not
>> be adding a new dependency there
>> Chetan Mehrotra
>
>
> FWIW, we the oak-blob POM also references json-simple, but it doesn't appear
> to be used.
>
> I really don't care what JSON lib we use, but it needs to be correct,
> maintained, and fast. If json.org fulfills these requirements then I'm more
> than happy to switch.
>
> Best regards, Julian
>

Re: Dependency on json-simple in oak-core

Posted by Julian Reschke <ju...@gmx.de>.
On 2014-03-10 13:58, Chetan Mehrotra wrote:
>> and org.apache.jackrabbit.oak.commons.json does not only seem to introduce a "JSOP" dependency (aren't we getting rid of that?), but also the JSON support doesn't appear to support data types... (JsonObject.getProperties returns a String/String map).
>
> In that case can we use the JSON library from json.org as thats widely
> used in projects like Sling Felix WebConsole already. So we would not
> be adding a new dependency there
> Chetan Mehrotra

FWIW, we the oak-blob POM also references json-simple, but it doesn't 
appear to be used.

I really don't care what JSON lib we use, but it needs to be correct, 
maintained, and fast. If json.org fulfills these requirements then I'm 
more than happy to switch.

Best regards, Julian


Re: Dependency on json-simple in oak-core

Posted by Chetan Mehrotra <ch...@gmail.com>.
> and org.apache.jackrabbit.oak.commons.json does not only seem to introduce a "JSOP" dependency (aren't we getting rid of that?), but also the JSON support doesn't appear to support data types... (JsonObject.getProperties returns a String/String map).

In that case can we use the JSON library from json.org as thats widely
used in projects like Sling Felix WebConsole already. So we would not
be adding a new dependency there
Chetan Mehrotra


On Mon, Mar 10, 2014 at 6:23 PM, Julian Reschke <ju...@gmx.de> wrote:
> On 2014-03-10 10:59, Chetan Mehrotra wrote:
>>
>> Thanks Julian. Created OAK-1521 to track this
>
>
> I have looked at this, and org.apache.jackrabbit.oak.commons.json does not
> only seem to introduce a "JSOP" dependency (aren't we getting rid of that?),
> but also the JSON support doesn't appear to support data types...
> (JsonObject.getProperties returns a String/String map).
>
> Best regards, Julian
>

Re: Dependency on json-simple in oak-core

Posted by Julian Reschke <ju...@gmx.de>.
On 2014-03-10 10:59, Chetan Mehrotra wrote:
> Thanks Julian. Created OAK-1521 to track this

I have looked at this, and org.apache.jackrabbit.oak.commons.json does 
not only seem to introduce a "JSOP" dependency (aren't we getting rid of 
that?), but also the JSON support doesn't appear to support data 
types... (JsonObject.getProperties returns a String/String map).

Best regards, Julian


Re: Dependency on json-simple in oak-core

Posted by Chetan Mehrotra <ch...@gmail.com>.
Thanks Julian. Created OAK-1521 to track this
Chetan Mehrotra


On Mon, Mar 10, 2014 at 1:07 PM, Julian Reschke <ju...@gmx.de> wrote:
> On 2014-03-10 05:06, Chetan Mehrotra wrote:
>>
>> Currently oak-core has a dependency on
>> com.googlecode.json-simple:json-simple:1.1.1 jar. Looking at compile
>> time usage I see it being referred only from RDBDocumentStore
>>
>> Would it be possible to use classes from
>> 'org.apache.jackrabbit.oak.commons.json' package and remove the
>> required dependency on this library
>>
>> Chetan Mehrotra
>
>
> Yes, I can have a look.
>
>

Re: Dependency on json-simple in oak-core

Posted by Julian Reschke <ju...@gmx.de>.
On 2014-03-10 05:06, Chetan Mehrotra wrote:
> Currently oak-core has a dependency on
> com.googlecode.json-simple:json-simple:1.1.1 jar. Looking at compile
> time usage I see it being referred only from RDBDocumentStore
>
> Would it be possible to use classes from
> 'org.apache.jackrabbit.oak.commons.json' package and remove the
> required dependency on this library
>
> Chetan Mehrotra

Yes, I can have a look.