RE: Getting started translating an existing API's schema / meta ?

Hi Josh,

On Tuesday, November 11, 2014 6:38 PM, Joshua Gough wrote:
> I've been reading about JSON-LD and Hydra recently, and wanted to use
> some time during a "hack week" in our company to translate our
> existing schema / meta info into one compatible with JSON-LD, but I'm

Cool


> not really sure where to get started. Most of the examples I've seen
> have contexts that ultimately resolve to schema.org definitions, and I
> don't know if that's the right thing for us.

JSON-LD is a serialization format. You also need a vocabulary which defines the various concepts (things) that you need to express the information. Schema.org is such a vocabulary. You can either use that (if it covers the concepts you need) or define your own. Defining a vocabulary is quite trivial. You just create a JSON-LD document that describes the various concepts and assigns each of them a unique URL. You than host that document at that URL and you are done. Have a look at what Hydra does for instance by downloading

   http://www.w3.org/ns/hydra/core

Basically you need to adapt that for the concepts you need.


> I'd love some tips on what I should do here.
> 
> I have a github repo with a summary of how our current API works here:
> https://github.com/JogoShugh/JSON-LD-VersionOne/blob/master/README.md

It would be much easier to help you if you have concrete questions. I don't have the time to read through a 3,500 line file, sorry :-)


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler

Received on Wednesday, 12 November 2014 22:47:07 UTC