ISSUE-622: Should PROV-AQ bless use of JSON-LD for service description?

json-ld-service-description

Should PROV-AQ bless use of JSON-LD for service description?

State:
CLOSED
Product:
Accessing and Querying Provenance
Raised by:
Graham Klyne
Opened on:
2013-01-31
Description:
In http://lists.w3.org/Archives/Public/public-prov-wg/2013Jan/0121.html , around issues 42) and/or 43), Stian has proposed specifying use of JSON-LD as a format for service descriptions. I'll paste the specific proposal as a separate comment to this issue.

I note that such use of JSON-LD is not disallowed by the current specification, just not explained. The general recommendation is that service descriptions are presented as RDF, though other formats are negotiable in keeping with REST principles. JSON-LD would be a specific [presentation of RDF.

The question is: should we consider making specific mention of JSON-LD for service descriptions? Considerations would include:
- does it make the specification more complex? (esp. "Obviously the "@context" here should be extracted and provided by us." - I haven't yet got to the bottom of what this implies)
- does it make the specification more presriptive? Is this desirable?
- is JSON-LD sufficiently well-used to be considered a blessed format fort RDF data?
- should we wait to see what consensus the W3C LDP group may form around the general topic of linked data service descriptions?
Related Actions Items:
No related actions
Related emails:
  1. prov-wg: core paq issues - please think/discuss before telcon (from p.t.groth@vu.nl on 2013-03-13)
  2. Re: PROV-AQ responses to Stian's review (part 2) (from soiland-reyes@cs.manchester.ac.uk on 2013-03-11)
  3. PROV-AQ issues pending review (from graham.klyne@zoo.ox.ac.uk on 2013-03-11)
  4. PROV-AQ responses to Stian's review (part 2) (from graham.klyne@zoo.ox.ac.uk on 2013-03-11)
  5. Fwd: Re: PROV-ISSUE-622 (json-ld-service-description): Should PRIV-AQ bless use of JSON-LD for service description? [Accessing and Querying Provenance] (from graham.klyne@zoo.ox.ac.uk on 2013-02-01)
  6. Fwd: Re: PROV-ISSUE-622 (json-ld-service-description): Should PRIV-AQ bless use of JSON-LD for service description? [Accessing and Querying Provenance] (from Graham.Klyne@zoo.ox.ac.uk on 2013-02-01)
  7. Re: PROV-ISSUE-622 (json-ld-service-description): Should PRIV-AQ bless use of JSON-LD for service description? [Accessing and Querying Provenance] (from graham.klyne@zoo.ox.ac.uk on 2013-02-01)
  8. PROV-ISSUE-622 (json-ld-service-description): Should PRIV-AQ bless use of JSON-LD for service description? [Accessing and Querying Provenance] (from sysbot+tracker@w3.org on 2013-01-31)

Related notes:

This is the text of Stian's proposal. Mainly, it consists of point 42), but makes reference to a loosely related proposal 43)

Ref: http://lists.w3.org/Archives/Public/public-prov-wg/2013Jan/0121.html

...

42) "this specification does not preclude the use of non-RDF formats"
JSON-LD <http://json-ld.org/spec/latest/json-ld-syntax/> is growing in
popularity, should we perhaps propose a JSON-LD context? I think it
would be quite straight forward, and actually managed to do it in
about 15 minutes (including learning the syntax).

If you try the JSON from https://gist.github.com/4565822 on
http://json-ld.org/playground/

( Obviously the "@context" here should be extracted and provided by us. )

You get the example from 4.1.3:

<http://example.com/service#direct>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/ns/prov#DirectQueryService> .
<http://example.com/service#direct>
<http://www.w3.org/ns/prov#provenanceUriTemplate> "?target={+uri}" .
<http://example.com/service#sparql>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/ns/sparql-service-description#Service> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#endpoint>
<http://example.com/service/sparql/> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#resultFormat>
<http://www.w3.org/ns/formats/RDF_XML> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#resultFormat>
<http://www.w3.org/ns/formats/SPARQL_Results_CSV> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#resultFormat>
<http://www.w3.org/ns/formats/SPARQL_Results_JSON> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#resultFormat>
<http://www.w3.org/ns/formats/SPARQL_Results_TSV> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#resultFormat>
<http://www.w3.org/ns/formats/SPARQL_Results_XML> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#resultFormat>
<http://www.w3.org/ns/formats/Turtle> .
<http://example.com/service#sparql>
<http://www.w3.org/ns/sparql-service-description#supportedLanguage>
<http://www.w3.org/ns/sparql-service-description#SPARQL11Query> .
<http://example.com/service>
<http://www.w3.org/ns/prov#describesService>
<http://example.com/service#direct> .
<http://example.com/service>
<http://www.w3.org/ns/prov#describesService>
<http://example.com/service#sparql> .


Without the embedded @context the actual description can become very
tiny, and perhaps even skip some "@id"s to say:

{
"@context": "http://www.w3.org/ns/prov-aq.jsonld",
"service": [
{ "@type": "direct",
"uritemplate": "?target={+uri}"
} ,
{ "@type": "sparql",
"endpoint": "http://example.com/service/sparql/"
}
]
}

Note that above I've added a prov:describesService relation to relate
the services with the description, and so that I may make nested JSON.
(see #43 below)



43) As shown in the complete example in 4.1.3, the
ProvenanceQueryService is not connected to the DirectQueryService or
sd:Service. Given that services don't have a general name, it would be
difficult for implementers to know if a node in the graph is a service
or just happens to be further/additional data (for instance details
about the publisher of the service). It also means I can't mention at
all a service, without implying that I am somehow providing it as part
of my service description.

I therefore suggest that the ProvenanceQueryService should link to the
services using a term like prov:describesService - see modified
example:


@prefix prov: <http://www.w3c.org/ns/prov#>
@prefix sd: <http://www.w3.org/ns/sparql-service-description#>

<> a prov:ProvenanceQueryService ;
prov:describesService <#direct>, <#sparql> ;
dcterms:publisher <#us> .

<#us> a foaf:Organization ;
foaf:name "and not a service!" .

<#direct> a prov:DirectQueryService ;
prov:provenanceUriTemplate "?target={+uri}"
.
<#sparql> a sd:Service ;
sd:endpoint </sparql/> ;
sd:supportedLanguage sd:SPARQL11Query .


The added advantage of this is that you can do the bnode shorthand
when you don't know quite know or care what to call your service
entries:

<> a prov:ProvenanceQueryService ;
prov:describesService [
[ a prov:DirectQueryService ;
prov:provenanceUriTemplate "?target={+uri}" ],
[ a sd:Service ;
sd:endpoint "?target={+uri}",
sd:supportedLanguage sd:SPARQL11Query
] .

Graham Klyne, 31 Jan 2013, 17:34:25

This was considered in the latest round of edits. The text about service decsription formats is quite permissive, with a recommendation to use standardized formats for interoperability. I don't think it's necessary or helpful to mention JSON-LD explicitly.

Graham Klyne, 7 Mar 2013, 15:13:40

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 622.html,v 1.1 2013-06-20 07:37:56 vivien Exp $