RE: Agenda: JSON-LD Telecon - Tuesday, July 2nd 2013

On Monday, July 01, 2013 8:46 PM, Robert Sanderson wrote:
> Dear Markus, Dave,
> 
> Yes, other information associated with the head node in the list.
> And just using the proposed syntax in issue 75.
> 
> eg:
> 
> {"@id": "http://example.org/stuff/list1",
>  "@type": "rdf:List",
>  "rdfs:label" : "Named List",
>  "@list": [1,2,3,4,5]
> }
> 
> Which would be the triples:
> 
> <http://example.org/stuff/list/1> a rdf:List ;
>   rdfs:label "Named List" ;
>   rdf:first 1 ;
>   rdf:rest <_bnode1> .
> 
> <_bnode1> a rdf:List ;
>   rdf:first 2 ;
>   rdf:rest <_bnode2> .
> ...

I haven't looked in detail but I think this would complicate the processing
algorithms considerably. Furthermore, lists would become somewhat
unpredictable. Currently, a list can always be compacted to just an array
using @container: @list, if this change were made, that wouldn't be the case
anymore. Even worse, it would be ambiguous how to interpret such data. Would
the list head be an item of an (outer) list (and the result thus be a list
of lists) or really just the head of the list?

I know that serializing it using rdf:first/rest isn't really user-friendly
but there are other options as well. You could, e.g., do something like

{
  "@id": "http://example.org/stuff/list1",
  "label" : "Named List",
  "listItems": [1,2,3,4,5]
}

(this is similar to the rdf:value example Niklas proposed in ISSUE-75)

Would that be a viable alternative?



--
Markus Lanthaler
@markuslanthaler

Received on Tuesday, 2 July 2013 08:19:33 UTC