RE: Yandex Testing Tool supports JSON-LD

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