- From: elf Pavlik <perpetual-tripper@wwelves.org>
- Date: Wed, 20 Jun 2012 13:17:46 +0000
- To: Markus Lanthaler <markus.lanthaler@gmx.net>
- Cc: public-linked-json <public-linked-json@w3.org>
Excerpts from Markus Lanthaler's message of 2012-06-20 10:31:52 +0000: > Hi Elf, > > There exists a vCard mapping to RDF [1] which would make it very easy to write a JSON-LD context. So, your jCard could easily be transformed to valid JSON-LD: > > { > "@context": { > "v": "http://www.w3.org/2006/vcard/ns#", > "VCard": "v:VCard", > "fn": "v:fn", > "nickname": "v:nickname", > "email": { "@id": "v:email", "@type": "@id" }, > "tel": "v:tel", > "Home": "v:Home", > "Voice": "v:Voice", > "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#value", > "address": "v:adr", > "street": "v:street-address", > "postcode": "v:postal-code", > "locality": "v:locality", > "country": "v:country-name" > }, > "@id": "http://example.com/me/corky", > "@type": "vCard:VCard", > "fn": "Corky Crystal", > "nickname": "Corks", > "email": "mailto:corky@example.com", > "tel": { > "@type": ["Home", "Voice"], > "value": "+61 7 5555 5555" > }, > "address": { > "@type": "Home", > "street": "111 Lake Drive", > "postcode": "5555", > "locality": "WonderCity", > "country": "Australia" > } > } > > Please note that you are free to define how your fields are named in the context. I simplified some here, e.g., "street-address" to just "street" and made sure you don't have to use prefixes. If you would be fine with using prefixes such in v:address in your JSON-LD documents the context could be simplified to something like: > > { > "@context": { > "v": "http://www.w3.org/2006/vcard/ns#", > "v:email": { "@type": "@id" }, > "r:value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#value" > } > } > > The document would then look as follows: http://bit.ly/Mw0weD > > > The advantage of using JSON-LD in this instance is that you could easily integrate data coming from RDF/XML, Turtle, RDFa (embedded in Websites) into your system. > > > [1] http://www.w3.org/TR/vcard-rdf/ > > > Hope this helps, WOW! thanks a lot Markus, looks to me like enough of advice to sort it out :) let's see what nil and other folks on unhosted list think about it... thank you once more!!!
Received on Wednesday, 20 June 2012 13:18:18 UTC