- From: Claus Stadler <cstadler@informatik.uni-leipzig.de>
- Date: Wed, 11 Dec 2013 17:45:50 +0100
- To: public-rdfjs@w3.org
Hi,
No matter what the exchange syntax, can we in the end have a utility function that returns something along the lines of Talis RDF json, with explicit RDF terms for each triple/quad component?
Example:
var quadOrTriples = [{
subject: {type: 'uri', value: 'http://foo.bar' },
predicate: {type: 'bnode', value: '123' },
object: {type: 'literal', value: 'hello', lang: 'en"},
graph: {type: 'literal', dtype: 'http://www.w3.org/2001/XMLSchema#' }
}, {
...
}];
This would be in accordance with the RDF(/OWL) paradigm of making semantics explicit - i.e. less logic to code ;)
Also, exchanging data in such a format wouldn't get much easier than this .
Cheers,
Claus
On 11.12.2013 17:12, Gregg Kellogg wrote:
> Note, however, that there's nothing that would prevent us from using a triple form of expanded JSON-LD, where each triple is in it's own object. Also, rdf:first/rdf:rest can be used in the JSON-LD representation, so use of @list is not necessary; for JSON-LD, toRdf would handle this just fine. Note that Named triples (quads) would require a bit more embedding, e.g.:
>
> {"@id":"http://graph-name", "@graph": {"@id":"http://subject","http://predicate": [{"@id":"http://object"}]}
--
Dipl. Inf. Claus Stadler
Department of Computer Science, University of Leipzig
Research Group: http://aksw.org/
Workpage & WebID: http://aksw.org/ClausStadler
Phone: +49 341 97-32260
Received on Wednesday, 11 December 2013 16:46:20 UTC