W3C home > Mailing lists > Public > public-linked-json@w3.org > June 2013

Re: Resolutions for features at risk [JSON-LD]

From: Gregg Kellogg <gregg@greggkellogg.com>
Date: Mon, 3 Jun 2013 09:57:57 -0700
Cc: public-linked-json@w3.org
Message-Id: <58589F09-E89C-4373-8CBE-C695C8615C75@greggkellogg.com>
To: Dave Longley <dlongley@digitalbazaar.com>
On Jun 3, 2013, at 9:51 AM, Dave Longley <dlongley@digitalbazaar.com> wrote:

> On 06/03/2013 07:35 AM, Markus Lanthaler wrote:
>> On Monday, June 03, 2013 12:15 AM, Gregg Kellogg wrote:
>>> On Jun 2, 2013, at 1:46 PM, Markus Lanthaler wrote:
>>>> If a consumer really doesn't like the literal values, it can, e.g.,
>>>> round-trip the data through the RDF conversion algorithms to convert
>>>> them to native types. Processors might also offer helper methods to
>>>> do this without having to go through RDF - I plan to add one to
>>>> mine. This also has the advantage that the user can select what to
>>>> transform (e.g., http://schema.org/Number).
>>> That's a pretty good idea, and I could support that.
>> Asking you and Sandro directly: Would it address your concerns if we would
>> change the default value of useNativeTypes to false and add a statement
>> saying that consumers can convert literals to native types by round-tripping
>> through RDF?
>> Would you support changing the conversion to include all XSD numeric types
>> (not sure about xsd:decimal) if useNativeTypes = true.
>> Would you support changing the conversion of JSON numbers to always produce
>> xsd:doubles?
> This question was for Gregg and Sandro, but I don't think that I would support *always* converting JSON numbers to xsd:doubles. I'd like this use case to be supported:
> Read some data from RDFa that has a datatype of xsd:integer. Convert the data to JSON-LD w/native number conversion on. Work with the data, possibly modifying the number. Convert the data to back to RDF (N-Quads) where the value (object) has an xsd:integer datatype and it looks like an integer (not a double).
> This use case is currently supported by the spec.

Perhaps it was a simplification to always convert numbers back to xsd:double. If we have a datatype associated with a property and the value is in the space of that datatype, then perhaps we could convert it back to that datatype on conversion.


>> We could also recommend (non-normatively) that JSON-LD processors implement
>> helper methods to do this without going through RDF, i.e., allowing it in a
>> manner which preserves the document's structure.
>> --
>> Markus Lanthaler
>> @markuslanthaler
> -- 
> Dave Longley
> Digital Bazaar, Inc.
Received on Monday, 3 June 2013 16:58:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:37 UTC