W3C home > Mailing lists > Public > public-vocabs@w3.org > December 2013

RE: Yandex Testing Tool supports JSON-LD

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Wed, 18 Dec 2013 13:05:26 +0100
To: "'Alexander Shubin'" <ajax@yandex-team.ru>
Cc: <public-vocabs@w3.org>
Message-ID: <019001cefbe9$71482bb0$53d88310$@lanthaler@gmx.net>
Hi Alex,

Sorry for the delay.

On Wednesday, December 04, 2013 12:35 PM, Alexander Shubin wrote:
> > What exactly do you mean by this?
> 
> I mean that we don't expand terms to full IRIs or JSON objects
> (http://www.w3.org/TR/json-ld/#dfn-expanded-term-definition) using
> information in @context as it is done by json-ld/playground
> (http://json-ld.org/playground/index.html), tab "Expanded".

OK. To illustrate the problem. Let's assume I enter:

  <script type="application/ld+json">
  { 
    "@context": {
      "Something": "http://schema.org/Country"
    },
    "@type": "Something",
    "name": "Russia"
  }
  </script>

What I get out as result is

  jsonld
    @type = Something
    @context
      Something = http://schema.org/Country
    name = Russia

I don't find this particularly helpful because it doesn't tell me at all how
Yandex is going to interpret this markup. Is it understanding that the
entity is of type "Country"? It just presents me the same JSON(-LD) data but
with all curly brackets and commas removed and labels it as "jsonld".


> > I played a bit with the validator but wasn't able to trigger a
validation
> > error unless I created invalid *JSON* (a missing comma for example).
> 
> Can you elaborate more about what did you try and what output did you
> expect? Concrete examples would help significantly!

Sure. Let's modify the example above to:

  <script type="application/ld+json">
  { 
    "@context": {
      "@context": "http://schema.org/Country"
    },
    "@type": "Something",
    "name": "Russia"
  }
  </script>

The validator should raise an error as this isn't valid JSON-LD. You can't
nest @context inside @context. Yet it says that everything is fine and that
the result is

  jsonld
    @type = Something
    @context
      @context = http://schema.org/Country
    name = Russia


> > It would be great if you could tweak the output a bit so that it
> > becomes clear what kind of data you were able to extract.

Well. You could for example tweak the output of the first example so that it
shows the following data instead:

  jsonld
    type = http://schema.org/Country

Please note that name isn't included as it wasn't mapped to an IRI and thus
you don't know what it means.


Is this any clearer? I'm more than happy to help where I can (e.g. by
reviewing new versions of your validator). Just ping me.


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler

Received on Wednesday, 18 December 2013 12:05:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:36 UTC