Re: Potential Formal Object from DERI over JSON-LD

On 10/20/2012 11:54 AM, Markus Lanthaler wrote:
> 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?
>
That's a good start, but the ordering of JSON arrays is a major part of JSON.  
I don't know every place that JSON-LD uses arrays, but each of them should 
have a discussion on ordering.

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

I haven't looked at the tests until now.  They appear to be on github.  Is 
there a way to get all the tests in a single document so that it is easy to 
search them?

If this is the only place where arrays show up in JSON-LD then it might be 
adequate, but don't arrays show up with named graphs?
>
>
>
>>>> 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?

The named graph near the beginning of the document.  I can't find that version 
any more, though.
>
>
> Cheers,
> Markus
>
>
>
> --
> Markus Lanthaler
> @markuslanthaler
>

Received on Saturday, 20 October 2012 16:48:33 UTC