Re: [Specifications] Use of Hydra collections for W3C WoT Discovery (#236)

We tend to keep Hydra agnostic of the RDF format an API would use. Our examples too are JSON-LD but it is a detail which would be unimportant to a generic client which is our default "audience".

That said, you would be free to structure your RDF responses whichever way you need, as long as they represent valid RDF syntactically and Hydra semantically. In that regard, nested `@context` inside each member of a hydra collection is perfectly fine as it breaks neither of the syntactic and semantic requirement.

So such an envelope would look something like below?

```json
{
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
  "@id": "/things",
  "@type": "Collection",
  "member": [{
    "@context": "https://www.w3.org/2019/wot/td/v1",
    "@id": "td:Thing"
  }],
  "view": {
    "@id": "/things/5",
    "previous": "/things/4"
    "next": "/things/6"
  }
}
```

This would be a valid way to ensure there are no clashes between Hydra and TD terms, keeping the members separate from the envelope's vocabulary

-- 
GitHub Notification of comment by tpluscode
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/236#issuecomment-823119669 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 20 April 2021 09:15:53 UTC