w3c / json-ld-framing

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

Clarify example for omit graph flag #88

Closed Fak3 closed 4 years ago

Fak3 commented 4 years ago

The spec at https://github.com/w3c/json-ld-framing/blob/master/index.html#L639 says:

if the omit graph flag is true, the top-level @graph entry may be omitted.

But the output given in the example 4 (Framed library objects) and example 5 (Framed library objects with omitGraph set to false) are exactly the same, making it difficult to understand what the omit graph flag is for.

gkellogg commented 4 years ago

Yes, this needs to be updated. The omitGraph flag defaults to true in 1,1 mode, which is the default. Set it to false to get the @graph back, or use the 1.0 processor mode for the implied false value.

Fak3 commented 4 years ago

Btw, I find the name of the flag a bit complicated to understand because of double-negation. I.e. in my mind "omit" means "don't include", and I always have to perform this mental exercise to parse 'don't include graph is False' into 'include graph'. Does anyone feels the same nuisance? Would it help to rename it to includeGraph?

iherman commented 4 years ago

This issue was discussed in a meeting.

gkellogg commented 4 years ago

@Fak3, please see updated text in PR #91. Please indicate if this satisfies your issue.

Fak3 commented 4 years ago

Yes, this resolves the issue, thanks

gkellogg commented 4 years ago

Reopened for WG to dispose of.