Re: JSON-LD Syntax request for FPWD via RDF WG

On 05/23/2012 07:16 AM, Richard Cyganiak wrote:
> On 23 May 2012, at 02:43, Manu Sporny wrote:
>> JSON (and thus JSON-LD) can be parsed into native data structures
>> in a variety of languages. Many languages have built-in JSON
>> processors. There is no such standard API or data structure for
>> any RDF serialization that I know of
>
> Ever heard of RDF/XML? And the DOM?

What's RDF/XML? :P

The XML DOM is not a standard API or data structure for accessing /RDF/.
It is a standard API/data structure for accessing /XML/.

I've tried to work with RDF/XML using the XML DOM - and it was a nightmare.

So, my assertion still stands.

>>> I would therefore prefer to see JSON-LD described as an RDF
>>> serialization.
>>
>> It's the other way around. RDF is a subset of JSON-LD.
>
> I think you misread what Dave wrote. subset != serialization.

Perhaps. Here's what I'm trying to say: You could just as easily
describe JSON-LD as a JSON serialization (which would be more accurate)
as describing it as an RDF serialization. It would be more correct to
call it a JSON serialization whose RDF-compatible statements can be
converted loss-lessly to RDF and back. Note that any conversion of a
mixed-mode JSON-LD document, like this (note the "unknownTerm" - which
has no RDF mapping):

{
   "@context": {"name": "http://xmlns.com/0.1/foaf/name"},
   "name": "Richard Cyganiak",
   "unknownTerm": "foo"
}

would lose the "unknownTerm" going from JSON-LD -> RDF -> JSON-LD. It's
a nuance, but an important nuance.

The JSON model is capable of round-tripping the RDF model. The RDF model
is not capable of round-tripping the JSON model. In order for the RDF
model to support round-tripping the JSON model - it would have to
support null-able subjects and it would have to support plain literal
predicates.

I would be fine with this language:

JSON-LD is a language that is capable of expressing the RDF model and
performing full JSON-LD to RDF to JSON-LD round-tripping.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
Founder/CEO - Digital Bazaar, Inc.
blog: PaySwarm Website for Developers Launched
http://digitalbazaar.com/2012/02/22/new-payswarm-alpha/

Received on Thursday, 24 May 2012 00:58:56 UTC