JSON export of SPARQL Results Table, with CONSTRUCT

27 views
Skip to first unread message

Dan Segal

unread,
Nov 17, 2020, 11:02:23 AM11/17/20
to TopBraid Suite Users
Hello,

I am observing that in EDG 6.4, the JSON export of the SPARQL Results Table is in RDF/XML format when a CONSTRUCT statement is used.

For example, this query produces a results table where the JSON export is in JSON format:

SELECT ?uri ?prefLabel
WHERE {
  ?uri a skos:Concept;
       skos:prefLabel ?prefLabel 
FILTER (str(?prefLabel) = 'test1')
}


However, the results table from the following statement, when exported to Simple JSON, are in RDF/XML.

CONSTRUCT {?uri skos:altLabel "altTest1"}

WHERE {
  ?uri a skos:Concept;
       skos:prefLabel ?prefLabel 
FILTER (str(?prefLabel) = 'test1')
}


This occurs when using the export Simple JSON feature from the SPARQL Results Table.

Is there a way to export the results of CONSTRUCT statements in JSON rather than XML?

Thank you,

Dan




Holger Knublauch

unread,
Nov 18, 2020, 7:49:36 PM11/18/20
to topbrai...@googlegroups.com

Hi Dan,

thanks for reporting this glitch. We will address this with a future update.

Have you tried the export option "Labeled JSON"? This produces sensible JSON to me.

Regards,
Holger

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/f7d2622b-f7b3-47fc-b63f-b5c9cf6bb0a5n%40googlegroups.com.

Holger Knublauch

unread,
Nov 18, 2020, 10:19:39 PM11/18/20
to topbrai...@googlegroups.com

FYI this is now fixed on our master branch for the 7.0 release. I also noticed that we didn't have options to export CONSTRUCT/DESCRIBE results as graphs, so I have added the options to produce JSON-LD, RDF/XML and Turtle too.

Thanks again for exploring these features and getting back to us, Dan.
Holger

Reply all
Reply to author
Forward
0 new messages