W3C home > Mailing lists > Public > public-credentials@w3.org > April 2017

Re: "Number" in RDF Dataset Normalization

From: Anders Rundgren <anders.rundgren.net@gmail.com>
Date: Fri, 14 Apr 2017 22:19:17 +0200
To: Dave Longley <dlongley@digitalbazaar.com>, W3C Credentials Community Group <public-credentials@w3.org>
Message-ID: <ed234645-a86d-8fc2-f064-a60df36afc46@gmail.com>
On 2017-04-14 21:45, Dave Longley wrote:
> On 04/14/2017 03:26 PM, Anders Rundgren wrote:
>> Hi All,
>>
>> I tried to read this document since JSON normalization/canonicalization
>> is something that interest a lot of people:
>> http://json-ld.github.io/normalization/spec/
>>
>> It is possible that I have read it too fast but I cannot find any
>> handling of Number which actually is a major PITA.
>> Other aspects of JSON (not RDF) normalization is something any habile
>> programmer should be able handle.
>
> The RDF Dataset Normalization spec is written to operate on an abstract
> representation of RDF. JSON-LD can be deserialized to RDF using the
> JSON-LD API spec (which is a W3C Rec). That spec mentions how it
> handles numbers here:
>
> https://www.w3.org/TR/json-ld-api/#data-round-tripping

Thanx Dave!

I'm surprised that the JOSE folks never referred to this.

LD doesn't return exactly the same result as ES6 serialization
for non-normalized numbers but that is probably not a major
issue because then you are pretty on the limit anyway.

4.9E-324 is converted to 5e-324 in ES6 and in LD to 4.940656458412465E-324

Anders

>
>
Received on Friday, 14 April 2017 20:19:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 July 2018 21:19:36 UTC