Closed sebbader-sap closed 9 months ago
It's not required by any specification. As long as it's not at the beginning of a JSON, the serialiser usually knows the class through the property (JSON key). However, in case several different classes (subclasses) are allowed, this approach won't work.
Options: 1) Only use @type where really needed. Pro: less attributes 2) Use @type in every class serialisation. Pro: consistent, simple rule. Pro: dcat:DataService, dcat:Dataset, and dcat:Resource can be distinguished.
Decision: Option 2a: Use @type in every class serialisation, however, put the type information into the context file.
from https://github.com/International-Data-Spaces-Association/ids-specification/pull/89/files#r1246200376 :
Shouldn't all classes also have a @type property (same goes for DataService, Dataset, Resource)? [...] we already have this problem with dct:hasPart in Catalog which is either a Catalog, Dataset, or DataService? So in that case we would need it for some objects and then it might be easier to include the @type everywhere to not require complex logic to see where to include it and where not.