Re: JSON serialization

On Oct 3, 2011, at 5:14 AM, Ivan Herman wrote:

> 
> On Oct 2, 2011, at 19:23 , Gregg Kellogg wrote:
> 
>> The Microdata spec [1] now references only a JSON serialization. JSON is becoming more and more interesting for developers, and the RDF WG has looked at two different specs, RDF/JSON [2] and JSON-LD [3]. Recently, the RDF WG stopped working on RDF/JSON with strong interest in further incubating JSON-LD, which is now a W3C Community Group [4].
>> 
>> Should this task force provide guidance for HTML serializations on JSON serialization,
> 
> Gregg, I am not sure what you mean. The task force description does refer to a possible RDFa->microdata/JSON mapping. Is this what you mean? Or is it a microdata -> JSON-LD that you are considering?

As you note, in the group's charter is to provide specifications for mapping RDFa to Microdata's JSON format. The Microdata format is lossy, in that it (at least) looses language information. When considering JSON serialization, IMO RDF round-tripping is important. If data is serialized to JSON, we should be able to get all the semantic content back out. With Microdata's JSON, this raises some issues, that might be addressed by providing some suggestions for improvement to the HTML WG. This could conceivably be to replace the existing JSON representation with something that may be a standard way to represent RDF in JSON, thus dealing with round-tripping issues.

Some of the issues with Microdata's JSON representation are:

* Language of literal values is lost,
* Other than for date formats, literal datatype information is lost (of course, for Microdata this is more than just a JSON serialization issue),
* Given that multiple property values are of necessity ordered in JSON, there is no way to represent traditional multi-valued properties, and there is an open question as to whether all Microdata RDF seriations should use rdf:List representations, if there are other rules to consider.

JSON-LD has addressed these issues, and can be used to perform a lossless transformation between RDF formats. This makes it useful to consider as the standard JSON format to be used by both Microdata and RDFa. Alternately, we should suggest improvements to the Microdata format and processing algorithm that make it lossless.

Gregg

> Ivan
> 
>> in addition to RDF? If a goal is to have the RDF generated by different implementations be compatible, should the same not be true for JSON? Does it make sense that the JSON serialization then allow for RDF round-tripping?
>> 
>> Gregg
>> 
>> [1] http://dev.w3.org/html5/md/#json
>> [2] http://docs.api.talis.com/platform-api/output-types/rdf-json
>> [3] http://json-ld.org/
>> [4] http://www.w3.org/community/json-ld/
>> 
>> 
>> 
> 
> 
> ----
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> PGP Key: http://www.ivan-herman.net/pgpkey.html
> FOAF: http://www.ivan-herman.net/foaf.rdf
> 
> 
> 
> 
> 

Received on Monday, 3 October 2011 16:33:28 UTC