The rdf:JSONLiteral datatype

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 UTC