W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2011

Re: JSON Results doc : First complete draft ready

From: Steve Harris <steve.harris@garlik.com>
Date: Tue, 17 May 2011 12:05:25 +0100
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <AE59E627-F3F1-48ED-984E-DF630769F686@garlik.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
On 2011-05-17, at 11:40, Andy Seaborne wrote:

> Edits done.
> 
> 
> On 17/05/11 09:26, Steve Harris wrote:
>> A quick review:
>> 
>> 3.1.1 "vars"
>> 
>> The "var" member - Should be "vars" I think. A variable is not
>> necessary ->  A variable is not necessarily
>> 
>> 3.2.1 "bindings"
>> 
>> Possibly worth including an example of a solution with no bindings,
>> the text /could/ be interpreted as meaning it should be omitted.
>> Minor point.
> 
> Example added, text reworded.
> 
>> In XML it's possible to include runtime warnings and errors inline in
>> XML comments without messing up processing. It would be good if there
>> was some way to do something similar in JSON, e.g if there was an
>> "_comment" key (anything disjoint from variable names) which was
>> defined to be ignored. JSON doesn't have "native" comments. Minor
>> point.
> 
> Tricky.
> 
> The XML comments aren't an XML element - different processing model - and can go anywhere.
> 
> I support there is nothing to stop an implementation adding "_comment" or "_warning" or etc if it wants to.
> 
> We would have to define where it can go.
> 
> We can:
> 1/ Leave the doc as-is - maximum backwards compatibility
> 2/ Define a key or keys and add some general text about it can go in any object.
> 3/ Define a key or keys and add to the doc like other keys.
> 
> I'm inclined to go for (1) [do nothing]
> 
> Are there any examples of system that do add anything to the JSON format?

Yeah, 4store apparently, it adds a "warnings": block after "results":, and puts an array of strings there: https://github.com/garlik/4store/blob/master/src/frontend/results.c#L1909

I'm not sure who did that, but it's quite a good idea!

On the downside you can't include warnings inline, you have to save them up to the end, but it's less likely to confuse old processors.

- Steve

>> On 2011-05-12, at 11:34, Andy Seaborne wrote:
>> 
>>> http://www.w3.org/2009/sparql/docs/json-results/json-results.xml
>>> 
>>> There is now a complete 1st draft document (and fairly unchecked).
>>> 
>>> It addresses the comments made (Richard, Michael, Paul) by
>>> restructuring the whole document and copying across content from
>>> before.  I wil go back and check the comments again but by the time
>>> the ties to the XML format are removed, it's a rather different
>>> document.
>>> 
>>> I have tried to strike a balance and retained a more informal style
>>> but it should also be accurate.
>>> 
>>> If anyone wants to have a go at JSON schema,
>>> http://json-schema.org/ then please do - I don't plan on doing that
>>> this time round.
>>> 
>>> It's time for reviews.  It's not a long document.
>>> 
>>> Andy
>>> 
>> 

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Tuesday, 17 May 2011 11:06:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:46 GMT