octopub
octopub copied to clipboard
@type in index.json
If following the JSON-LD spec, when you use @type
it should be an indication of the type of the object that you are pointing to. If you have:
[{
@type: "/people",
url: "people.json"
}]
that implies the type of people.json
is /people
, which it isn't. Best to leave @type
off altogether here, and look for something that enables you to define the API/service. This needs some research, but options would be:
- http://jsonapi.org/format/
- https://www.w3.org/TR/ldp/
@ldodds may have some ideas.