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 Marius Petria <mp...@adobe.com> on 2015/03/03 16:00:07 UTC

Re: svn commit: r1663526 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/document/ main/java/org/apache/jackrabbit/oak/plugins/document/memory/ main/java/org/apache/jackrabbit/oak/plugins/document/mongo/ main/java/o...

Hi Chetan,

I commented also on the issue. Probably the best approach would be to 
register a String[] such that it can be read by PropertiesUtil.toMap 
(key=value). I think is the “standard” way to represent maps in OSGI 
properties.

Marius 




On 3/3/15, 8:52 AM, "Chetan Mehrotra" <ch...@gmail.com> wrote:

>On Tue, Mar 3, 2015 at 12:19 PM, Julian Reschke <ju...@gmx.de> 
>wrote:
>> This is ugly; I don't think it's a good idea to introduce JSON-shaped
>> strings here. If we need more structure, why not a Map?
>
>The description has to be finally converted to string to be published
>as string service property. So probably DocumentStore API returns a
>Map with method name like getMetadata and then
>DocumentNodeStoreService serializes it as a JSON string.
>
>Would that work?
>
>Chetan Mehrotra

Re: svn commit: r1663526 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/document/ main/java/org/apache/jackrabbit/oak/plugins/document/memory/ main/java/org/apache/jackrabbit/oak/plugins/document/mongo/ main/java/o...

Posted by Chetan Mehrotra <ch...@gmail.com>.
Ack. Done with http://svn.apache.org/r1663854. Further DocumentStore
now returns a map of metadata and it should not be concerned now with
how this metadata gets serialized.
Chetan Mehrotra


On Tue, Mar 3, 2015 at 8:30 PM, Marius Petria <mp...@adobe.com> wrote:
> Hi Chetan,
>
> I commented also on the issue. Probably the best approach would be to
> register a String[] such that it can be read by PropertiesUtil.toMap
> (key=value). I think is the “standard” way to represent maps in OSGI
> properties.
>
> Marius
>
>
>
>
> On 3/3/15, 8:52 AM, "Chetan Mehrotra" <ch...@gmail.com> wrote:
>
>>On Tue, Mar 3, 2015 at 12:19 PM, Julian Reschke <ju...@gmx.de>
>>wrote:
>>> This is ugly; I don't think it's a good idea to introduce JSON-shaped
>>> strings here. If we need more structure, why not a Map?
>>
>>The description has to be finally converted to string to be published
>>as string service property. So probably DocumentStore API returns a
>>Map with method name like getMetadata and then
>>DocumentNodeStoreService serializes it as a JSON string.
>>
>>Would that work?
>>
>>Chetan Mehrotra