I have committed a fix in Rev. 784278. You might want to update the servlets/get bundle and crosscheck. Thanks.
Regards Felix Felix Meschberger schrieb: > Hi Stuart, > > After re-reading the JsonQueryServlet, I saw the bug. It is not related > to any JCR query stuff but to how we add properties to the result as per > the property parameters. This is done by only accessing the property > value as a single value which fails for multi-value properties ... > > I created SLING-1006 [1] to track this and will commit a fix shortly. > > Do you still need the full node dump functionality ? > > Regards > Felix > > [1] https://issues.apache.org/jira/browse/SLING-1006 > > D. Stuart Freeman schrieb: >> On Fri, Jun 12, 2009 at 08:18:01PM +0200, Felix Meschberger wrote: >>> Hi Stuart, >>> >>> >>> D. Stuart Freeman schrieb: >>>> I'm trying to get back a multivalued property from the JSON Query >>>> Servlet, but it appears that that doesn't work. Here's what I did: >>>> >>>> curl -Ftitle="some title text" -Ftext="some body text content" \ >>>> -Ftest="1" -Ftest="2" http://admin:ad...@localhost:8080/some/new/content >>>> >>>> That posts successfully, and I can view it at >>>> http://localhost:8080/some/new/content.json and see that test is >>>> ["1","2"]. If I try to find it with JQS though at >>>> http://localhost:8080/some.query.json?queryType=xpath&statement=/jcr:root/some/new/*&property=title&property=test >>>> >>>> The title property is correctly displayed, but test is shown as "". Is >>>> this a known issue, or should I open a Jira? >>> This is a fundamental problem of JCR Query: Multi-value properties are >>> not returned in the Query rows. There is nothing Sling can do about it, >>> unfortunately. >>> >>> >>>> Also, is there a way to request that the JQS return all defined >>>> properties on a node? >>> Using the JsonQuery servlet you list explicitly the properties, which >>> you want to get back. This servlet cannot return all properties of a >>> node, right now. >>> >>> I could imagine though, that we could provide an enhancement of the >>> JsonQueryServlet, which would return the contents of the QueryResult >>> rows but the contents of the nodes matching the query. >>> >>> This would also allow you to get back the multi-value properties, since >>> those values would be access through the matching node directly. >>> >>> WDYT ? >> That sounds like exactly what I would need. >> >>> Regards >>> Felix >