> 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
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