Not unless you add it yourself. As a note, you may not want to design your 
application where you are relying on the default json renderer to supply 
information to the front end client. It can reveal more information and 
structure then a lot of people are comfortable with. 

-----Original Message-----
From: Bruce Edge [mailto:bruce.e...@nextissuemedia.com] 
Sent: Wednesday, November 12, 2014 1:49 PM
To: users
Subject: HATEOAS compliant json self/child references from sling?

Can one retrieve HATEOAS format responses form sling?

%> curl -qu admin:admin http://localhost:8090/var/content.tidy.json
{
  "jcr:createdBy": "admin",
  "jcr:mimeType": "application/octet-stream",
  "jcr:created": "Sat Nov 08 2014 16:17:51 GMT-0800",
  "jcr:lastModified": "Sat Nov 08 2014 16:17:51 GMT-0800",
  "jcr:primaryType": "sling:Folder"
}

Using a HATEOAS server I would expect something like this:
{
  "jcr:createdBy": "admin",
  "jcr:mimeType": "application/octet-stream",
  "jcr:created": "Sat Nov 08 2014 16:17:51 GMT-0800",
  "jcr:lastModified": "Sat Nov 08 2014 16:17:51 GMT-0800",
  "jcr:primaryType": ³sling:Folder"
 "_links":{
    "self":{
      "href":"http://localhost:8090/var/content";
    }
  }
}

Is it possible to have sling insert both self and child references into all 
json responses?

-Bruce

Reply via email to