RE: more (ugh) on JSON-LD numbers

On Wednesday, July 10, 2013 4:37 PM, Peter F. Patel-Schneider wrote:
> Having been burnt more than once already on JSON-LD numbers, this time
> I'm going to ask before stating.  :-)
> 
> 1/  What is a JSON-native number, if it is not a JSON number from RFC
> 4627, Section 2.4?

If we talk about a JSON-native number we mean a number from RFC4627.


> 2/ What JSON-native numbers can't be losslessly round-tripped through
> RDF?

It depends on the implementation.


> 3/ What is the fractional part of a JSON number if it is not fraction
> part (frac) in RFC 4627, Section 2.4?

fractionalPart = number mod 1;  // e.g. 1.5 mod 1 = 0.5



> 4/ Which xsd datatypes are to be used for the following JSON numbers?
>      0.0
>      1.1E1

xsd:integer


>      0.1
>      0.00000000000000000000000000000000000000001
>      11E-1

In most cases xsd:double.



--
Markus Lanthaler
@markuslanthaler

Received on Wednesday, 10 July 2013 15:00:43 UTC