- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Sat, 3 Mar 2012 15:19:05 +0800
- To: <public-linked-json@w3.org>
Hi Mark, This is definitely the right place to ask such questions. So let me try to answer them. > Hence, I have now suggested to our mailing list that we adopt JSON-LD > within BibJSON; the idea is that BibJSON remains simple, and anyone > who wants to do validation / namespaces could do so by following the > JSON-LD rules - e.g. identify a namespace, use it in their BibJSON, > then write whatever tests are required within that context to check > that BibJSON records they receive meet their needs. I'm not really sure if I understand what you mean by validation and especially by namespaces. Could you point me to an example how you intend to use those namespaces? The only thing I found was http://bibjson.org/#collection and "dc" isn't used anywhere else in that example. > In order to do this, I think all that is required is that we point > people at the JSON-LD website, and do some examples; so I have a > couple of questions: > > 1. the examples, I think, will just need to use the @context key > within a JSON object to point to the relevant namespace, then use the > relevant keys from that namespace. Am I right, or is there more? Basically that's enough but you would to prevent to end up with just blank nodes after a conversion to RDF e.g. you would also need to set the subject, i.e., use "@id". You already have an "id" element but unfortunately its value is not an IRI. Linked Data requires that you identify things by assigning them a unique IRI. I also couldn't find any information about the media type you are using for BibJSON. To be Web-friendly you would need to mint a new media type for it (regardless of whether you use JSON-LD or not). If you are just using application/json you could link to the context by means of an HTTP header, see http://json-ld.org/spec/latest/json-ld-syntax/#referencing-contexts-from-jso n-documents > 2. Our records can come in a object under the "records" key, and that > object may also contain a "metadata" key (hence, the total object is a > collection). Is there a sensible way in JSON-LD to add the namespace > information only to the metadata object, to save copying it into every > record? In that case you would normally add the context definition at the top-level object. It is then valid throughout the document: { "@context": ... "metadata": ... "records": ... } > 3. If you are continuing to look for uptake of JSON-LD, and if I am > looking to recommend it to our community, would you be happy to answer > these questions and potentially a couple more as I try to come up with > some examples for people to follow? I'm sure everyone of us is happy to help you. It will also help us to understand how people are going to use JSON-LD. So, feel free to post as many questions as you like :-) -- Markus Lanthaler @markuslanthaler
Received on Saturday, 3 March 2012 07:19:38 UTC