- From: Alexander Shubin <ajax@yandex-team.ru>
- Date: Fri, 27 Jun 2014 13:47:42 +0000
- To: "public-vocabs@w3.org" <public-vocabs@w3.org>
- CC: Markus Lanthaler <markus.lanthaler@gmx.net>
- Message-ID: <2CEED914-E084-4174-A9DE-E3D0454C15C3@yandex-team.ru>
Hi all, I'm happy to say that we've implemented full JSON-LD @context expansion in our validation tool. http://webmaster.yandex.ru/microtest.xml Now it expands any context including remote ones hosted somewhere else than schema.org<http://schema.org/>. It also throws exception if any error occures while expanding. The algorithm is based on W3C specification: http://www.w3.org/TR/json-ld-api/. For instance, examples provided last time are processed correctly 1. <script type="application/ld+json"> { "@context": { "Something": "http://schema.org/Country" }, "@type": "Something", "name": "Russia" } </script> * * * * @type = http://schema.org/Country * 2. <script type="application/ld+json"> { "@context": { "@context": "http://schema.org/Country" }, "@type": "Something", "name": "Russia" } </script> * * * jsonld ERROR: @context expansion error: keyword redefinition * @context * @context = http://schema.org/Country * @type = Something * name = Russia * 3. <script type="application/ld+json"> { "@context": "http://json-ld.org/contexts/schema.org.jsonld", "@id": "http://me.markus-lanthaler.com", "@type": "Person", "name": "Markus Lanthaler", "this-property": "does not exist" } </script> * * * jsonld WARNING: http://schema.org/this-property field not specified in http://schema.org/Person * @id = http://me.markus-lanthaler.com * @type = http://schema.org/Person * http://schema.org/name * @value = Markus Lanthaler * http://schema.org/this-property * @value = does not exist * As always feedback is very appreciated! ---- Best, Alex On Dec 26, 2013, at 6:32 PM, Markus Lanthaler <markus.lanthaler@gmx.net<mailto:markus.lanthaler@gmx.net>> wrote: On Monday, December 23, 2013 10:38 AM, Alexander Shubin wrote: Hi Markus, Jim, Thanks a lot for your thorough feedback! I really appreciate your help! As far as I may conclude from the thread the biggest confusion comes from @context non-resolution (which I wrote about in the first message). Of course we do parse and analyze it. But since it's not clear from validator's output we obviously should improve it. Thanks for the examples - we'll use them for reference while testing. Is it correct that the most intuitive way would be expanding property names and values with the @context, dropping @context itself along with properties not mapped to an IRI? Yeah, I would say so. Thanks again for checking our tool! Our primary goal is to help webmasters with using JSON-LD and prevent possible errors. So the more intuitive and correct output in validator, the better code on web pages. +1 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. Absolutely! Thanks! P.S. BTW you can drop <script> now - it was too annoying :) Cool! -- Markus Lanthaler @markuslanthaler
Received on Friday, 27 June 2014 13:48:13 UTC