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

Odd relative IRI in playground output

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Fri, 21 Feb 2014 18:24:58 -0800
Message-Id: <4E4FCE3F-7934-416F-8D91-2D81A02C46C6@greggkellogg.net>
Cc: Linked JSON <public-linked-json@w3.org>, Dan Brickley <danbri@google.com>
To: Dave Longley <dlongley@digitalbazaar.com>
DanBri noticed an odd relative IRI in playgroud: https://t.co/redirect?url=http%3A%2F%2Ft.co%2FCXwET1L08I&t=1&sig=5934b2edb90c43746e35a41fd40374eb89a03a31&iid=5b95eb792ef84751afbf1e15534b5d9b&uid=6125262&nid=27+1268.

This must relate to the default base used by the playground, but when I run it with my own processor (without specifying a base IRI), I don't see the relative IRI.

Basically, it's compacting the following:

{
  "@context": {
    "@vocab": "http://schema.org/",
    "url": {
      "@type": "@id"
    }
  },
  "@type": "Movie",
  "@id": "http://code.sgo.to/movies/123",
  "name": "Dan's schema.org presentation",
  "operation": [
  {
    "@type": "WatchAction",
    "@id": "",
    "actionStatus": "proposed",
    "actionHandler": {
      "@type": "WebPageHandler",
      "url": "/movies/123/watch"
    }
  }]
}

using an empty context and getting the following:

{
  "@id": "http://code.sgo.to/movies/123",
  "@type": "http://schema.org/Movie",
  "http://schema.org/name": "Dan's schema.org presentation",
  "http://schema.org/operation": {
    "@id": "./",
    "@type": "http://schema.org/WatchAction",
    "http://schema.org/actionHandler": {
      "@type": "http://schema.org/WebPageHandler",
      "http://schema.org/url": {
        "@id": "../movies/123/watch"
      }
    },
    "http://schema.org/actionStatus": "proposed"
  }
}

However, mine returns the following:

{
  "@id": "http://code.sgo.to/movies/123",
  "@type": "http://schema.org/Movie",
  "http://schema.org/name": "Dan's schema.org presentation",
  "http://schema.org/operation": {
    "@id": "",
    "@type": "http://schema.org/WatchAction",
    "http://schema.org/actionHandler": {
      "@type": "http://schema.org/WebPageHandler",
      "http://schema.org/url": {
        "@id": "/movies/123/watch"
      }
    },
    "http://schema.org/actionStatus": "proposed"
  }
}


Gregg Kellogg
gregg@greggkellogg.net
Received on Saturday, 22 February 2014 02:25:29 UTC

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