- From: Charpenay, Victor (ext) <victor.charpenay@siemens.com>
- Date: Fri, 8 Jan 2016 10:13:21 +0000
- To: "dsr@w3.org" <dsr@w3.org>
- CC: "public-web-of-things@w3.org" <public-web-of-things@w3.org>
- Message-ID: <6E3FA85ED8C35E42B0F7DE1E44FD0C9FF6C98A@DENBGAT9EL5MSX.ww902.siemens.net>
Hi Dave, hi everybody,
I’m not sure I understood your idea behind this experiment. To which extent is your algorithm different from the deserialization specified in the JSON-LD API document [1]?
With jsonld.js (used in the JSON-LD playground [2]), we have a quite similar result. The following JSON object (one of your tests):
{
"@context": {
"@vocab": "coap://example.org/mything/"
},
"properties": {
"on" : {
"type" : "boolean",
"writeable": true
},
"working" : "boolean"
}
}
becomes:
_:b0 <coap://example.org/mything/properties> _:b1 .
_:b1 <coap://example.org/mything/on> _:b2 .
_:b1 <coap://example.org/mything/working> "boolean" .
_:b2 <coap://example.org/mything/type> "boolean" .
_:b2 <coap://example.org/mything/writeable> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
The only difference is I added a default namespace for keys. One could imagine this namespace corresponds to the address of the thing we describe or the exact URI of the document. It can of course be combined with the proposed default WoT @context.
I wish you all a happy new year.
Best regards,
Victor
[1] http://www.w3.org/TR/json-ld-api/#rdf-serialization-deserialization-algorithms
[2] http://json-ld.org/playground/
From: Dave Raggett [mailto:dsr@w3.org]
Sent: Dienstag, 29. Dezember 2015 12:38
To: Drasko DRASKOVIC
Cc: public-web-of-things
Subject: Re: [TF-TD] experimenting with mapping JSON based data models to RDF triples
On 29 Dec 2015, at 01:52, Drasko DRASKOVIC <drasko.draskovic@gmail.com<mailto:drasko.draskovic@gmail.com>> wrote:
Hi Dave,
On Mon, Dec 28, 2015 at 5:22 PM, Dave Raggett <dsr@w3.org<mailto:dsr@w3.org>> wrote:
To attract Web developers to working with the Web of Things we need simple
notations for describing the properties, actions and events for things.
Simple notations are also needed for Web of Things servers on resource
constrained microcontrollers.
Data models are one kind of metadata for things, and we also need a way to
map these models to the underlying resource description framework (RDF).
JSON-LD [1] is appealing due to its use of the very popular JavaScript
Object Notation (JSON). However, JSON-LD wasn’t designed with thing data
models in mind. I have therefore been exploring the implications for
translating JSON based data models to RDF triples.
My experiments are in the form of a Web page that expresses the algorithm in
JavaScript.
http://www.w3.org/2016/01/json2rdf.html
I would like to request some time at an upcoming Thing Description task
force call to introduce this work and talk through the questions that arise.
These include:
How to survey the Web developer community for their opinions
The role of paths for uniquely naming fields in thing data models
Allowing for deeply nested data models for properties, actions and events
Processing implications for different approaches for representing data
models
The role of open versus closed world hypothesis for thing data models
How to address versioning — something critical for web scale services
I know that we had similar discussion before, but did you take a look
at CoRE format: https://tools.ietf.org/html/rfc6690?
Yes, I have, and there are many other serialisations for RDF, e.g. Turtle, N3, RDF-XML, binary encodings of triples and so forth. But, it isn’t just about RDF, for the Web of Things we need solutions for declaring the data models exposed to applications. These needs to be simple and appealing to Web developers. We also need to consider the processing implications for resource constrained devices including low-end microcontrollers. I welcome a discussion on this as I don’t think that any of the existing solutions are a good fit.
—
Dave Raggett <dsr@w3.org<mailto:dsr@w3.org>>
Received on Friday, 8 January 2016 10:15:49 UTC