W3C home > Mailing lists > Public > public-linked-json@w3.org > August 2014

Default @type

From: David Janes <davidjanes@davidjanes.com>
Date: Thu, 7 Aug 2014 15:32:26 -0400
Message-ID: <CACp1KyPZiBuDM2zrG5KjgF7k3azJ6aBPMkLrdWTHERDEmy6L5A@mail.gmail.com>
To: Linked JSON <public-linked-json@w3.org>
Let's say I have some temperature / humidity data

    {
      "temperature" : 22.1,
      "humidity" : 44
    }

I can mark this up semantically using JSON-LD as follows (note the JSON-LD
at the link is a little wonky right now in terms of naming):
    {
      "@type" : "https://iotdb.org/iotdb/models/firmata-dht11",
      "@context" : "https://iotdb.org/iotdb/models/firmata-dht11",
      "temperature" : 22.1,
      "humidity" : 44
    }

Great, this record now has a type and proper definitions for temperature
and humidity.

But let's say I want to leave the record alone and use HTTP Links headers
to annotate, as per [1]. Obviously I get the @context. But how do I get the
@type associated with the record?

[1] http://www.w3.org/TR/json-ld/#interpreting-json-as-json-ld

Regards,

D.
Received on Thursday, 7 August 2014 19:33:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:42 UTC