Thank you a lot for your comment (I'm still not well rounded on the SPARQL 
terminology).
 
 

Sent: Tuesday, May 16, 2017 at 10:57 AM
From: "james anderson" <[email protected]>
To: "Laura Morales" <[email protected]>
Subject: Re: Return nested JSON results
good morning;

the specific question is, whether jena supports json-ld framing.
the framing context is what controls the nesting.

> On 2017-05-16, at 09:08, Laura Morales <[email protected]> wrote:
>
>> JSON-LD is an RDF syntax for graphs and datasets so it will need to be a
> CONSTRUCT or DESCRIBE query.
>>
>> XML/JSON/CSV/TSV are result set format for SELECT.
>>
>> Andy
>
>
> I tried some simple CONSTRUCT query to return a JSON-LD subgraph of my 
> dataset. I don't see any nesting though, all I see is a "@graph" array with 
> all the nodes one after the other like this
>
>
> "@graph" : [ {
> "@id" : "resource-1",
> "@type" : [ "type-1", "type-2" ],
> "some-property" : "resource-2"
> }, {
> "@id" : "resource-2",
> "label" : "some-label"
> } ],
>
>
> whereas I was expecting something like this
>
>
> "@graph" : [ {
> "@id" : "resource-1",
> "@type" : [ "type-1", "type-2" ],
> "some-property" : {
> "@id" : "resource-2",
> "label" : "some-label"
> } ],
>
>
> Scouting the web for information, I've found these links which seem to 
> suggest that Nested JSON-LD is a thing,
>
> http://json-ld.org/spec/latest/json-ld-api-best-practices/#embed-objects
> http://json-ld.org/spec/latest/json-ld/#nested-properties[http://json-ld.org/spec/latest/json-ld/#nested-properties]
> https://productforums.google.com/forum/#!msg/webmasters/bh30ZJ_Grnc/_mICiaMR0aEJ[https://productforums.google.com/forum/#!msg/webmasters/bh30ZJ_Grnc/_mICiaMR0aEJ]
>
> so I was wondering if Jena supports this type of output (Nested JSON-LD) for 
> CONSTRUCT queries, and how can I "enable" it?
 

Reply via email to