w3c / json-ld-framing

JSON-LD 1.1 Framing Specification
https://w3c.github.io/json-ld-framing/
Other
25 stars 20 forks source link

Default value for @type #74

Closed AtesComp closed 4 years ago

AtesComp commented 4 years ago

Currently, @type cannot accept @default in the playground. For framing, the documentation seems to indicate that @type (a keyword) must be a definitive resource for matching and not definable.

So, how is type added via framing?

I assume the answer would be either:

  1. "@type": {"@default": "ex:Book"}
  2. "@type": {"@default": {"@id": "ex:Book"}}

Since "@type": "@id" is the usual specification, 2 seems redundant.

NOTE: I know, I've bugged about this quite a bit in the main JSON-LD area. Since framing was proposed as the solution, I'm officially posting the issue here.

gkellogg commented 4 years ago

Yes, we did say that framing was the right way to do this, but the framing algorithm doesn't presently allow for this.

Defaults are added in 4.7.4 of the Framing Algorithm which iterates over non-keywords, and thus ignores a default for @type. It is probably sufficient to update the algorithm to also include @type.

iherman commented 4 years ago

This issue was discussed in a meeting.

azaroth42 commented 4 years ago

Resolved, closing :)