Re: Model of Claims

On 10/21/2017 05:37 AM, Reto Gmür wrote:
> Rereading vc-data-model I'm getting ab bit confused and I would 
> appreciate someone helping me understand.

I'll try, more below...

> In section 3.1 it seem that the claim is a graph.

It is.

> What confused me a bit is the statement that "To make the claim 
> verifiable, more information must be added to the graph of 
> information", because I would have imagined this graph being kind of 
> the payload of the verifiable claim with a separation of the graph 
> with the actual claim "Pat is over 21 and knows Sam, a student" from 
> the statements making the authorship of this claim verifiable.

Yes, your understanding of the underlying concept is correct.

> Since nested graphs are not yet supported in RDF I wanted to look at 
> the JSON-LD to see how this is solved (named graph or reification?).

I don't know what definition of "nested graph" you are using, but one
could argue that RDF 1.1 Datasets fit some definition of "nested graph".
We also support named/bnode graphs in JSON-LD.

A few data points:

1. RDF 1.1 supports Datasets and JSON-LD builds on that concept (and
   supports graph nesting as a part of the core JSON-LD data model,
   which is RDF 1.1 compatible). Fundamentally, this means that
   named graphs, and "graph nesting" (using a fairly loose
   definition of that term) is supported. "claim" points to a
   named/nested graph.
2. JSON-LD 1.1 will (hopefully) support graph containers as well. We've
   added this support to the reference implementation of JSON-LD, which
   is turned on in v1.1 processing mode.

> The JSON-LD however confused me even more. Looking at the example 12
>  in section 7.2.1 there is the triple:
> 
> <http://example.gov/credentials/3732> 
> <https://w3id.org/credentials#claim> 
> <did:example:ebfeb1f712ebc6f1c276e12ec21> .

Yes, this example is misleading. It should be something like:

<http://example.gov/credentials/3732>
  <https://w3id.org/credentials#claim>
    _:graph1
      _:DEFAULT_GRAPH .

<did:example:ebfeb1f712ebc6f1c276e12ec21>
  <ex:somePredicate>
    <ex:someObject>
      _:graph1 .

That said, I'm afraid that doing so is going to confuse the hell out of
most folks that don't know about the formal data model behind all of
this stuff. Instead, we may want to express the examples in pictures
rather than in NQuads.

> But I don't see any other triple describing 
> <did:example:ebfeb1f712ebc6f1c276e12ec21>.  The JSON-Key "ageOver" 
> doesn't resolves to a property.

Yes, it was just an example that we'll have to replace with a more
correct one.

> Shouldn't <did:example:ebfeb1f712ebc6f1c276e12ec21> be a named graph
>  containing something: like :Pat :ageOver 21 ?

<did:example:ebfeb1f712ebc6f1c276e12ec21> NQuads should be contained in
a named graph (e.g. _:graph1), which contain stuff like :Pat :ageOver 21.

We have added a new feature to JSON-LD that enables the expression of
stuff like this... so you do something like this in the JSON-LD Context:

"claim": {
  "@id": "https://w3id.org/credentials#",
  "@container": "@graph"
}

... and that avoids us having to do something like this:

"claim": {
  "@graph": [{
    "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    "ageOver": 21
  }]
}

... and instead we can do this sort of markup in JSON-LD, which is easy
for web developers and formally correct:

"claim": {
  "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
  "ageOver": 21
}

> A side question: what is the URI scheme "did"?

https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust-fall2017/blob/master/topics-and-advance-readings/did-primer.md

> As you can see, I'm a bit lost...

Understandably, but I think I can clearly see why you were lost given
your background and the hand waving we're doing on the formal stuff in
the spec right now. Clearly, we need to fix that.. how would you propose
we do that and keep "regular web developer" readability?

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
Founder/CEO - Digital Bazaar, Inc.
blog: Rebalancing How the Web is Built
http://manu.sporny.org/2016/rebalancing/

Received on Saturday, 21 October 2017 16:27:11 UTC