RE: JSON as JSON-LD

Hi Mark,

> The idea was that some existing XML documents should be able to be
> interpreted as RDF/XML.  So this;
> 
> <Person xmlns="something">
>   <Name>Mark</Name>
>   <City>Ottawa</Name>
> </Person>
> 
> means the same thing as if it were wrapped in rdf:RDF.
> 
> I had a look at the spec, and AFAICT (by looking at the spec, but also
> playing in the playground), this isn't the case with JSON-LD, i.e. the
> following JSON isn't also JSON-LD;
> 
> {"name":"Mark","city":"Ottawa"}

It is valid JSON-LD but not valid linked data as there's no way to map those
two properties (name & city) to a IRI. You would need a context to do so.


> Is there a reason why this isn't already the case?

You can already link to a context from a plain-old JSON document by using an
HTTP link header [1].


> I'm still quite new
> to JSON-LD and don't have a feel for some of its goals, but as a new
> user, this would simplify things for me. And as I mentioned to the RDF
> WG, it's also a terrific tool in explaining the value of JSON-LD and
> also in aiding in migration from JSON to JSON-LD.

What things would it simplify for you?


> I should mention that despite using JSON-LD, I'm *not* using RDF, so
> I'm not at all concerned about the fact that "name" and "city" aren't
> grounded. I understand that will be a concern for others, but it would
> be nice if I weren't required to care about it ;-)

This sentence confuses me a bit. What's the value of JSON-LD compare to
plain old JSON if the properties are not mapped to an IRI (that's how I
understand the "grounded" in this sentence)?


[1]
http://json-ld.org/spec/latest/json-ld-syntax/index.html#referencing-context
s-from-json-documents


--
Markus Lanthaler
@markuslanthaler

Received on Monday, 16 April 2012 22:11:44 UTC