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

Yeah, the situation with respect to numbers is now probably as good as it can 
be, modulo reception from the JSON community.

The JSON-LD API needs to distinguish "fractional part" from RFD 4627 JSON 
numbers "fraction part" and frac production.  The suggestion on the call 
today, something like "fractional part (i.e., the remainder modulo 1)", I 
believe, would work fine, I think.

peter



On 07/10/2013 08:04 AM, Markus Lanthaler wrote:
> On Wednesday, July 10, 2013 4:51 PM, Peter F. Patel-Schneider wrote:
>> On 07/10/2013 06:49 AM, Markus Lanthaler wrote:
>>> This was already proposed by Pierre-Antoine some time ago but didn't
>> have enough support to result in a spec change. I could live with that
>> but wouldn't be too happy about it because it would mean that a JSON-LD
>> document like
>>>     {
>>>       "@id": "",
>>>       "ex:prop": 1
>>>     }
>>>
>>> wouldn't result in the following Turtle document
>>>
>>>     <> ex:prop 1
>>>
>>> but
>>>
>>>     <> ex:prop 1.0E0
>>>
>>> I think most people would agree that the mapping we currently have
>> aligns better in that regard.
>>
>> Yes, but there is the potential issue that round-tripping the RDF literal
>> "1.0E1"^^xsd:double through JSON-LD using JSON numbers (even ignoring
>> potential further round-tripping through JSON implementations) appears
>> to result in "10"^^xsd:integer.
> That's true and documented here:
>    http://json-ld.org/spec/latest/json-ld-api/#data-round-tripping
>
> That's also the reason why the useNativeTypes flag in the fromRDF algorithm is set to false by default. So a "1.0E1"^^xsd:double would end up as
>
>    {
>      "@value": "1.0E1",
>      "@type": "xsd:double"
>    }
>
> by default when converting to JSON-LD.
>
>
> --
> Markus Lanthaler
> @markuslanthaler
>
>

Received on Wednesday, 10 July 2013 15:46:48 UTC