Hi Tony,

Did you use a depth selector "([0-9]+|infinity)" in the URL? Otherwise, the
JSON response will only contain one level of properties.

i.e. /path/to/your/node.infinity.json


Mark Adamcin
Acquity Group



On Mon, Aug 16, 2010 at 10:29 AM, Tony Giaccone <[email protected]> wrote:

>
>
> I'm a bit confused as to why this is happening
>
> When I hit a url that should return an order in json format, I get a
> partial order, attributes are missing as are the line items.
>
> {"firstName":"Sally",
>        "sling:resourceType":"mss/order",
>        "orderId":"MSS1001001",
>        "shipId":"EO9B7XM66q4G",
>        "lastName":"SMITH",
>        "completionInd":"0.0",
>        "jcr:primaryType":"nt:unstructured"
> }
>
>
> When I hit the same URL, but with .xml instead of .json the line items are
> part of the xml that gets returned.
>
> <_x0033__1280793452838
>        jcr:primaryType="nt:unstructured"
>        orderId="MSS1001001"
>        firstName="SALLY"
>        lastName="SMITH"
>        shippingId="EO9B7XM66q4G"
>        completionInd="0.0"
>        sling:resourceType="mss/order"
>        xmlns:ocm="http://jackrabbit.apache.org/ocm";
>        xmlns:fn="http://www.w3.org/2005/xpath-functions";
>        xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions";
>        xmlns:xs="http://www.w3.org/2001/XMLSchema";
>        xmlns:jcr="http://www.jcp.org/jcr/1.0";
>        xmlns:mix="http://www.jcp.org/jcr/mix/1.0";
>        xmlns:sv="http://www.jcp.org/jcr/sv/1.0";
>        xmlns:sling="http://sling.apache.org/jcr/sling/1.0";
>        xmlns:rep="internal"
>        xmlns:nt="http://www.jcp.org/jcr/nt/1.0";>
>                <lineItems
>                        jcr:primaryType="sling:OrderedFolder"
>                        jcr:created="2010-08-02T19:57:32.850-04:00"
>                        jcr:createdBy="admin">
>                                <_x0031_
>                                        jcr:primaryType="nt:unstructured"
>                                        lineItemSeq="1"
>                                        quantity="12"
>                                        shortDescr="Description 1"
>                                        sling:resourceType="mss/item"
>                                        price="235.00"/>
>                                <_x0033_
>                                        jcr:primaryType="nt:unstructured"
>                                        lineItemSeq="3"
>                                        quantity="12"
>                                        shortDescr="Description 2"
>                                        sling:resourceType="mjb/charge"
>                                        price="54.0"/>
>                </lineItems>
> </_x0033__1280793452838>
>
>

Reply via email to