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: Peter F. Patel-Schneider <pfpschneider@gmail.com>
Date: Mon, 08 Jul 2013 14:59:50 -0700
Message-ID: <51DB3656.6010405@gmail.com>
To: Markus Lanthaler <markus.lanthaler@gmx.net>
CC: 'RDF WG' <public-rdf-wg@w3.org>

On 07/08/2013 12:13 PM, Markus Lanthaler wrote:
> [...]
>>> OK.. it's xsd:integer not xsd:long though
>> Really? Arbiitrarily big?
> Yes
>
>
>> Personally I would prefer xsd:integer, but I thought that the idea was
>> to reflect the JSON (although JSON really only has double-precision
>> floating point).
> No, JSON doesn't impose any restrictions on numbers. It is ECMAScript which uses doubles for JSON numbers.
>
>

Isn't JSON defined in terms of ECMAScript?   http://json.org/ seems to so 
indicate.  I see, however, that the JSON-LD document points at RFC 4627.  RFC 
4627 doesn't specify anything except a grammar, as far as I can see, although 
it too points at ECMAScript.

I had some trouble trying to find the referenced document, European Computer 
Manufacturers Association, "ECMAScript Language Specification 3rd Edition", 
December 1999, as the document at 
http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf is 
edition 5.1.

I did finally find the referenced document. It has an unusual mapping for 
numbers, but then
goes on to use IEEE floating point double as its numeric type.   It this 
appears that the mapping for JSON numbers should be simple - just use 
xsd:double as the type.  Of course, it's not really that simple - the 
treatment of numbers in ECMAScript is truly mind-boggling, but in the end, a 
numeric literal is a value of the Number type, and the Number type is a subset 
of IEEE floating point double.  Edition 5.1 of ECMAScript does not appear to 
have any changes that would disturb this relationship.

>>>> - A typed value consists of a value, which is a string, and a type, which is
>>>>      an IRI.  *Most types in typed values are XML Schema 1.1 Datatypes
>>>>      [pointer to document].*
>>> I would really prefer to leave this out.
>> Why?
> Because it doesn't add any value. RDF-aware readers know that already, others would probably get confused why *XML* Schema is used in a JSON spec and reading the document wouldn't make that much clearer.
>
>
I suppose that this could be left out, but I don't see why it would confuse any one, and I think that it is important for non-RDF-aware readers.


>>>> - A list is an sequence of zero or more IRIs, blank nodes, and JSON-LD
>>>>      values.  *JSON-LD lists are shorthands for RDF list structures
>>>>      [informative pointer to RDF Semantics D.3?].*
>>> If really necessary I could live with this but would prefer to not
>>> state this here but perhaps mention it in Appendix C. I would like to
>>> hear more opinions. Richard disagreed and I think Manu wouldn't be too
>>> happy this either.
>> My (second-choice) view is that this appendix should be an informative way of
> Which appendix do you mean? Appendix A Data Model or appendix C?

Appendix A.
>
>> showing that JSON-LD *is* RDF, without going into any of the low-level
>> details.   Thus there should be at least a gloss on how all the bits
>> and pieces of JSON-LD *are* RDF, particularly the bits that look as if they
>> are different from RDF.
> That's what I intended to do in appendix C. We would just have to say that a JSON-LD list corresponds to a rdf:List instead of talking about differences e.g.
>
> Will you be able to join the JSON-LD telecon tomorrow? I would really like to try to resolve this issue this week.

I'll try to make it.  10am EDT, right?

>
>
> Thanks,
> Markus
>
>
> --

peter
Received on Monday, 8 July 2013 22:00:24 UTC

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