RE: Potential Formal Object from DERI over JSON-LD

On Saturday, October 20, 2012 7:14 AM, Peter F. Patel-Schneider wrote:

> >> All the JSON ordered constructs allowed in JSON-LD MUST be stated to
> >> be insignificant
> > What do you mean by "JSON ordered constructs"? Do you mean the
> concept
> > of the JSON 'array'?
> 
> Yes.
> > If so, we cover this in "Section 4.9: Sets and Lists".
> 
> Arrays can occur in lots of places in JSON documents, only some of
> which are
> covered in 4.9, I think.

We already state at the beginning (section 1.2) that

"In JSON, an array is an ordered sequence of zero or more values. An array is represented as square brackets surrounding zero or more values that are separated by commas. While JSON-LD uses the same array representation as JSON, the collection is unordered by default. While order is preserved in regular JSON arrays, it is not in regular JSON-LD arrays unless specific markup is provided (see 4.9 Sets and Lists)."

Does that address your concern?


> >> and there MUST be a test that tests this
> > There are a number of tests for @set and @list. I added an issue to
> > ensure that list order is maintained when round-tripping to/from RDF:
> >
> > https://github.com/json-ld/json-ld.org/issues/167
> >
> > I note that we don't have one for ensuring that a set isn't ordered,
> but
> > how do you write that test?
> 
> You have two JSON-LD document that use arrays and that have different
> ordering, and you state that they encode the same RDF graph.

Aren't the tests toRdf-0012 and toRdf-0015 showing just that? The former ignores that array-order (by default), the latter serializes a list:

https://github.com/json-ld/json-ld.org/blob/master/test-suite/tests/toRdf-0012-in.jsonld
https://github.com/json-ld/json-ld.org/blob/master/test-suite/tests/toRdf-0012-out.nq

https://github.com/json-ld/json-ld.org/blob/master/test-suite/tests/toRdf-0013-in.jsonld
https://github.com/json-ld/json-ld.org/blob/master/test-suite/tests/toRdf-0013-out.nq



> >> Examples MUST be stated to be RDF, not linked data.
> > Which examples?
> 
> Well, for example, the figure that was in the previous version of the
> document.

Which figure are you referring to?


Cheers,
Markus



--
Markus Lanthaler
@markuslanthaler

Received on Saturday, 20 October 2012 15:55:13 UTC