- From: Gregg Kellogg <gregg@greggkellogg.net>
- Date: Wed, 30 May 2012 14:18:56 -0400
- To: "nathan@webr3.org" <nathan@webr3.org>
- CC: Linked JSON <public-linked-json@w3.org>
On May 30, 2012, at 11:07 AM, Nathan wrote:
> Hi All,
>
> Just a quick question about sets and lists, after reading the
> specification I see that a set is an unordered set, and a list is an
> ordered set - however I don't see anything which mentions how distinct
> values should be handled?
>
> Is list to act like an ordered sequence of elements, and set like a..
> well unordered set where each member is distinct?
Yes, that's basically it. In a set, each value shares the same subject and property, and there are no duplicates (just like RDF). In a list, each value is in a sequence, and there can be repeats; basically, it's an RDF Collection.
Set:
{"@id": "s", "p": ["o1", "o2"]} => :s :p :o1, :o2 .
List:
{"@id": "s", "p": {"@list": ["o1", "o2"]}} => :s :p (:o1 :o2) .
Gregg
> Cheers,
>
> Nathan
>
Received on Wednesday, 30 May 2012 18:19:33 UTC