1

is it possible to use GrapdDB to create a curl SPARQL query with json-LD output (no export)?

Which parameter do I have to insert in the URL?

thank you in advance

mr_sol
  • 241
  • 1
  • 3
  • 7

2 Answers2

3

In order to get results in JSON-LD format you should add the following to the URL:

Accept=application%2Fld%2Bjson

Please note that only DESCRIBE and CONSTRUCT queries support the JSON-LD format.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
tokovach
  • 96
  • 3
0

I think that you have to add a HTTP header and I don't think adding a query param will work. Eg:

curl -HAccept:application/ld+json http://localhost:7200/repositories/some/statements?query=CONSTRUCT...

Unfortunately, you can't specify a context or frame to be used for the output.

Vladimir Alexiev
  • 2,477
  • 1
  • 20
  • 31