W3C home > Mailing lists > Public > public-rdf-comments@w3.org > May 2012

The rdf:JSONLiteral datatype

From: Dominik Tomaszuk <ddooss@wp.pl>
Date: Thu, 17 May 2012 11:39:40 +0200
Message-ID: <4FB4C75C.4030305@wp.pl>
To: public-rdf-comments@w3.org
Dear RDF-WG members,

I propose a new JSON datatype. Here is my proposal:
An IRI denoting this datatype
http://www.w3.org/1999/02/22-rdf-syntax-ns#JSONLiteral

The lexical space
is the set of all strings which are self-contained JSON-text [RFC4627];

The value space
is a set of JSON objects or arrays [RFC4627]. Two objects or arrays A 
and B are considered equal if and only if the JSON method and == 
operator JSON.stringify(A) == JSON.stringify(B) returns true [ECMA262-5].

The lexical-to-value mapping
Let jsontext be a JSON object or array [RFC4627] corresponding to the 
literal's lexical form
Return JSON.parse(jsontext) [ECMA262-5]

[RFC4627] http://www.ietf.org/rfc/rfc4627
[ECMA262-5] 
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf (mainly 
section 15)

Best regards,

Dominik Tomaszuk
Received on Thursday, 17 May 2012 09:40:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 17 May 2012 09:40:11 GMT