jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: jsop and property / node with same name
Date Thu, 08 Mar 2012 10:58:57 GMT
hi david

> note: there is twice the key "toast". as far as i understand json, this
> is not valid. the php function json_decode just overwrites the property
> "toast" =>  "bar" with the node array "toast" =>  array(). javascript json
> parsers tend to do the same.
> is jackrabbit using a custom json parser that can handle same-name keys?

jackrabbit has a custom json parser.

> are there any plans to make this valid json?

no... not at the moment as same name property and node are
not properly supported by the jcr remoting anyway (see also JCR-1616)

> or would the jcr spec forbid it? found nothing about it. when looking at
> the xml representation, it sounds totally normal. when outputting i.e.
> the path of the property and the node it looks strange.
> thanks for input,

imo the same-name-property-node feature was a bad move in jsr 283
and i don't see a particular value in having this feature.

some time ago i was chatting with julian about possibilities
to distinguish properties and nodes in the jcr-remoting but
we never really invested sufficient time to address this.

as far as jsop is concerned i don't remember that we ever
talked about this problematic. but you may come up with a
suggestion on how to address this.

without a having a closer look i can think of
a - no supported at all (there is an repository descriptor for
     -> fix jcr-server not to return this descriptor and not
        to allow for same-named node/property siblings
b - supported by ignore the fact that it isn't valid json
c - invent some extra marker for properties that have the same
     name as a sibling node.
and there are for sure many other options if this really turns out
to be a problem.

b was for free, a was rather cheap. right now with all the
jackrabbit3 effort i wouldn't invest a lot of time in c.

but it's definitely worth to keep this in mind for later
JSOP discussions in order not to forget to address this once
we have a more formal and finalized protocol.


> david
> - --
> Liip AG // Agile Web Development // T +41 26 422 25 11
> CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> AwIAoMNJSL0VwGfjxfDJy6c87k/5gbj5
> =fe9h

View raw message