-
Notifications
You must be signed in to change notification settings - Fork 66
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
[WIP] Make store return JSON-LD when preferred #90
base: master
Are you sure you want to change the base?
Conversation
Annotations can now be serialised into JSON-LD formatted RDF, following the data model spec: http://www.openannotation.org/spec/core/
Because JSON-LD spec recommends keeping @context at the top.
Let's keep the default very generic, for example we don't even know if users are Persons. Implementors can subclass Annotation to add more user info (as with any of the properties).
Note that render does not return a string or response object, but an object that jsonify can process. This can be changed when we wish to support formats that are not JSON-based. Also the content-negotiation/rendering is still only done on endpoints that are read-only, because to use writable endpoints one needs to understand the annotator-specific format anyway.
@nickstenning @tilgovi since @Treora's cycles are diminishing, do you think we could get this merged? I'm happy to pick up where he left of if it needs any more tweaking. Thanks for building this @Treora! |
@BigBlueHat: I would like to note that this code never left the experimental phase. We're mostly talking about PR #83 here by the way, as this PR #90 is only adding content negotiation on top of that. |
The follow-up on #83.
Note that render does not return a string or response object, but an
object that jsonify can process. This can be changed when we wish to
support formats that are not JSON-based.
Also the content-negotiation/rendering is still only done on endpoints
that are read-only, because to use writable endpoints one needs to
understand the annotator-specific format anyway.