W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > October 2006

Re: JSON from SPARQL for multiple assertions

From: Richard Newman <r.newman@reading.ac.uk>
Date: Sat, 7 Oct 2006 15:16:13 -0700
Message-Id: <7AB3A6AD-23A9-468F-9D99-2A933B377DA2@reading.ac.uk>
Cc: public-rdf-dawg-comments@w3.org
To: conor325 <conor@the325project.org>

Sure, making it an array would be useful in that case (if you wanted  
to just grab an array for one binding), but what in this case:

b foaf:name "Bobby"
c foaf:name "Bobby"
b foaf:name "Robert"
d foaf:name "Robert"


Also, the code to walk the results is actually less elegant in your  
suggested scheme (pseudocode):

for binding in bindings do
   print binding.name.value


for binding in bindings do
   for each_name in name do     // it's an array
     print each_name.value

I actually prefer it the DAWG's way. Furthermore, both the XML and  
JSON results serializations mirror the conceptual SPARQL 'result' (a  
set of bindings), which gives a nice consistency.


On  7 Oct 2006, at 2:20 PM, conor325 wrote:

> thx Lee.
> BTW, does the JSON format have to directly ape the XML form - so  
> that if the XML form has multiple bindings then the JSON form must  
> too? The extra binding - or many extra bindings if there are many  
> multiple assertions - doesn't seem to serve the purpose of JSON  
> which I think is to be trivial for a client to process?
Received on Saturday, 7 October 2006 22:16:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:07 UTC