- From: Thomas Hoppe <thomas.hoppe@n-fuse.de>
- Date: Mon, 23 Mar 2015 17:35:54 +0100
- To: Miguel <miguel.ceriani@gmail.com>, "public-hydra@w3.org" <public-hydra@w3.org>
Hi Miguel, On 03/23/2015 04:10 PM, Miguel wrote: > Hi Thomas, > thanks for the reply. > I have quite a good Semantic Web background (RDF,OWL,SPARQL,...) but I > am new to the world of Semantic Web APIs. > So I profited quite a lot from following your presentation. > I didn't even know what HATEOAS meant. So basically most of the "so > called" REST APIs are not really REST if they don't describe > programmatically their affordances? I would not say 'describe programmatically', I would say in a way 'which is machine readable'. > It seems to me that Hydra can be a concrete enabler for the Semantic > Web (here in the most general meaning, not related to a specific set > of technologies) as it offers a way to describe APIs in a standard way > such that generic clients are able to consume the services without > previous knowledge. That's the holy grail. > Also other standard ways to access Linked Data like the LD Platform or > the LD Fragments can be useful in that direction. > > Actually I arrived to read JSON Hyper Schema following a more specific idea. > Is there a general way to build simple adapters for existing > (pseudo-)REST APIs so that a full semantic frontend is made available > (maybe supporting Hydra or for simple cases just LDP)? > If that could be done in a concise and possible declarative way, > existing services could be easily adapted such that they can be > consumed by generic Hydra or LDP clients. There is some stuff out there [1] but certainly not what you describe. > > So I started looking for declarative options to do that. > Starting bottom-up, for a JSON-based service the first thing would be > a declarative way to convert JSON messages to meaningful Linked Data > (serialized through JSON-LD). The easiest way to do this is to add a HTTP Link Header pointing to a corresponding context. Maybe you can additionally add/ override the content type to ` application/ld+json`. > JSON Hyper Schema used for that task seems to give greater flexibility > than JSON-LD contexts. But not supporting polymorphism is a certain > drawback. Another limit is that it would be in any case just one-way, > without an analogous of Compaction. > > I think that, following your suggestion, I will try directly with a > semantic representation. I am thinking about using JSON-LD contexts > embedded in a Hydra documentation of the would-be semantic API. Those > JSON-LD, associated to specific classes and/or operations, would be > used to translate the message back and forth the underlying "old API". > What do you think about it? I'm not sure whether I understood you correctly her, can you make an example? > > Best, > Miguel [1] http://www.w3.org/community/rdfjs/wiki/Comparison_of_RDFJS_libraries
Received on Monday, 23 March 2015 16:36:26 UTC