W3C home > Mailing lists > Public > public-rdf-wg@w3.org > July 2013

RE: Updated JSON-LD spec to more closely align w/ RDF data model

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Wed, 10 Jul 2013 16:49:28 +0200
To: "'RDF WG'" <public-rdf-wg@w3.org>
Message-ID: <00a701ce7d7c$af3e1060$0dba3120$@lanthaler@gmx.net>
On Wednesday, July 10, 2013 4:18 PM, Peter F. Patel-Schneider wrote:
> In a certain strong sense I don't care about the actual solution, just that it 
> somehow matches JSON (which appears to be rather difficult as no one seems to 
> know just what JSON numbers mean, so I guess that this devolves to matching 
> JSON implementations), that meets the "burst of laughter" test (which means 
> that no one bursts out laughing when the solution is described to them), and 
> that it covers all JSON numbers (up to a certain magnitude and/or precision, 
> perhaps).


> The first bit is why I was asking about implementations that support this 
> particular way of interpreting JSON numbers.

Sandro just said in another mail that this is what Python does. I just checked was PHP does:

    json_decode('{ "number1": 1, "number2": 1.4 }')

results in

    public 'number1' => int 1
    public 'number2' => float 1.4

I guess the same is true for almost all languages that distinguish between ints and floats.

Markus Lanthaler
Received on Wednesday, 10 July 2013 14:50:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:30 UTC