Re: [JSON] market segments - 6B solutions

> However, I would like to add that imho there is a growing need to 
> standardize something separate like jTriples and Talis' RDF/JSON for 
> Level 7 above. 

Do you mean for 6B or 7B?   See 
http://www.w3.org/2011/rdf-wg/wiki/JSON_User_Segments

We're talking about the blue box, possibly the gray box under it.

> Ideally if we produce text/ntriples or text/nquads, then 
> it would be nice to have a JSON production of that standardized and 
> registered as application/ntriples+json or suchlike, it could be an easy 
> hit within minimal specification.

Yes, I agree.  

FWIW, on that front, I'm thinking the SPARQL Result Format is the
leading contender, with just the addition of standardizing the names of
the variables.   This has the added benefit of also giving us a JSON
quad format with no extra work.   That is, we just use:

"SELECT * WHERE { ?s ?p ?o }" for triples, and
"SELECT * WHERE {GRAPH ?g {?s ?p ?o}}" for quads.

Trying that on a random 4store database (rather than reading the spec,
oops), I get this:

{"head":{"vars":["s","p","o"]},
 "results": {
  "bindings":[
   {"s":{"type":"bnode","value":"b100000000000004"},
    "p":{"type":"uri","value":"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"},
    "o":{"type":"uri","value":"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"}},
   {"s":{"type":"bnode","value":"b30000000000000c"},
    "p":{"type":"uri","value":"http:not-yet-defined-sorry.example.com/resume#group"},
    "o":{"type":"bnode","value":"b30000000000000d"}},
   ...

and this:

{"head":{"vars":["g","s","p","o"]},
 "results": {
  "bindings":[
   {"g":{"type":"uri","value":"a"},
    "s":{"type":"bnode","value":"b100000000000004"},
    "p":{"type":"uri","value":"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"},
    "o":{"type":"uri","value":"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"}},
   ...
 
Part of what makes me lean in this direction is that I've been trying to
write some javascript stuff using RDF, and I find mostly I want to do
app-specific SPARQL queries, and just see the results in json.  So, if I
want a whole graph, it's nice to not have to do anything different.

Although, honestly, in writing apps, so far I'm finding I'd prefer
OO-style data to triple-style, and I've been having my serverside code
do that conversion.   Hmm.   Not sure how to generalize that yet.

   -- Sandro

Received on Thursday, 17 March 2011 17:25:21 UTC