Re: Capabilities & Schemas

> On May 4, 2018, at 11:04 AM, Benjamin Francis <bfrancis@mozilla.com> wrote:
> 
> What is the relationship between a JSON-LD style "@type" which is defined by an external schema at iotschema.org <http://iotschema.org/> and a JSON Schema style "type" which is defined in a Thing Description? (Note the awkward name duplication in the terms "type"...

The keyword "type", as used in TD, is specifically a json schema keyword that describes a json schema construct within a DataSchema element of a TD. In the simple TD, we allow opening an unambiguous DataSchema definition with "type" as you do in your Property Interaction examples.

@type is json-ld type, and while admittedly there could be a format that uses @type to call up an XSD type which might concievably be interpreted in a similar way as a JSON Schema type...

We use "type" for JSON Schema type, which is structures and data types, and @type for semantic annotation. This enables us to annotate elements within a JSON Schema and makes RDF conversion a little bit more straightforward (as opposed to say creating another e.g. "semtype" keyword)

I guess it's somewhat of a duplication but here we decided that once you learn it, it's really the least confusing option. 

Best regards,

Michael

Received on Wednesday, 16 May 2018 02:52:11 UTC