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

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
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:53 UTC