On Nov 8, 2006, at 4:10 AM, Mikael Högqvist wrote:
Hi all,
I found a bug in the JSON sparql serializer. When a query contains an
OPTIONAL not matching all bindings in the result, the serializer adds
an unnecessary "," to the end of the list of bound variables. The eval
method in the _javascript_ implementation of Opera had problems with
this, firefox handled it somehow. Anyway, I think the test case
explains it better (see attached file).
Thank you for the test case. I've added and committed the test to rdflib's tests. Next will be to get it to pass ;)
I'm also not sure if the selected variables are reported correctly. In
the test case "x", "name" and "friend" are selected, but in the head
only "x" and "name" are listed. If the optional wouldnt find any of
the variables listed in the optional then this is correct, I think...
but now when the "friend" variable is bound, should it also be listed
in head?
I'm not sure either. Will need to dig in to the issue to tell. I added a pointer from the test case back to your email so we can address both issues.
Thanks you again for the test case -- we just cleaned up rdflib's test cases yesterday -- so your timing on a new test case was perfect ;)
Cheers,
Mikael
<testJSON.py>
_______________________________________________
Dev mailing list