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

On Tuesday, July 09, 2013 12:00 AM, Peter F. Patel-Schneider wrote:
> On 07/08/2013 12:13 PM, Markus Lanthaler wrote:
> 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.

No, the JSON we use is RFC 4627. It was inspired by ECMAScript, but has a couple of important differences. Most notably numbers are of arbitrary size and precision and valid documents have to be arrays or objects at the top level.


> 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.

Yes, that's one concrete implementation. Other implementations may have different value spaces.


> >>>> - 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.

OK. We will discuss it.


> >>>> - 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?

Exactly. Here are all the details: http://json-ld.org/minutes/



--
Markus Lanthaler
@markuslanthaler

Received on Tuesday, 9 July 2013 09:01:27 UTC