w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

Examples 91 & 92 very confusing, especially given language maps #253

Closed azaroth42 closed 4 years ago

azaroth42 commented 5 years ago

Reading example 91, I was confused as to how the indexing of the language of the body was somehow used to index the resources. Until I got below the example and read "The en and de keys will be ignored semantically, but preserved syntactically, by the JSON-LD Processor."

Given the emphasis on the dot property accessor to language maps, this seems an ill-advised example. Instead, some other index feature should be used. Perhaps this could be "p1", "p2" and so on for ordering, to then have object.post.p1 and so on?

Also, the use of the language in the @id as a slug makes it look like that's where the information comes from.

I think it should be further clarified that this structure will not round trip through an RDF graph form. Yes, it gets preserved in expansion, but not in translation to nquads and back again. Thus is round-tripping is a desirable feature (or compaction from non-json-ld), then this feature should not be used.

And then this gets even worse with the dc:language case in the next section, where it still looks like a language map, but isn't. Please lets find another example!

Unless I'm missing something about basic indexing?