Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTFS] Add JSON-LD contexes #22

Open
pietercolpaert opened this issue Oct 21, 2014 · 8 comments
Open

[GTFS] Add JSON-LD contexes #22

pietercolpaert opened this issue Oct 21, 2014 · 8 comments

Comments

@pietercolpaert
Copy link
Member

In order for these vocabularies to be used for various JSON-LD API responses, we can help the API builder by providing JSON-LD contexts for them. A context defines the structure of the response and what JSON key/words to use for what URI.

@pietercolpaert pietercolpaert changed the title Add JSON-LD contexes [GTFS] Add JSON-LD contexes Oct 27, 2014
@pietercolpaert
Copy link
Member Author

/fwd @ocorcho @bertspaan - You were both interested in adding JSON-LD contexes to the Linked GTFS vocabulary. This would be really helpful!

@bertspaan
Copy link

@pietercolpaert Thanks - we are still working on the backend of our GTFS processing, we should be able to show you some output and very basic JSON-LD contexts later this week.

I've created an issue in our repo with extra information and use cases, I'll post some JSON and JSON-LD data output there soon.

@pietercolpaert
Copy link
Member Author

Cool! Will add some examples there!

Another thing I would recommend is not to make a distinction between JSON and JSON-LD. When the context is good, the JSON-LD will be as usable as JSON :)

@bertspaan
Copy link

Yes, but JSON-LD does add lots of extra data to our API's output, which I'm sure users of our API not always need. Therefore, we have decided on, by default, returning standard GeoJSON, and only JSON-LD when &format=jsonld is specified. What do you think about this?

@pietercolpaert
Copy link
Member Author

It's good that you allow multiple content types for different clients. Yet, I would prefer JSON-LD to be the standard JSON representation: it's the format where you can still convert the data to its most atomic pieces (s-p-o triples) and still be interoperable (in the sense that there will not be identifier collisions) out of the box with other RDF datasets. Geojson on the other hand is a more narrow format: its intended use is to put things on a map.

@bertspaan
Copy link

Maybe you're right 👯 Anyway, it's as simple as changing

default_format :json

to

default_format :jsonld

in the API's initialization code. I'll drink a beer tonight and think about whether I should do this.

@ocorcho
Copy link

ocorcho commented Oct 28, 2014

I am happy to volunteer to create the JSON-LD context if you like, at some point in time next week probably. So if any of you is quicker, let me know.

@pietercolpaert
Copy link
Member Author

Added an example JSON context to a newly created, rather small, stoptimes ontology. Read about it here: https://github.com/OpenTransport/vocabulary/blob/master/stoptimes/spec.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants