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

[WIP] Make store return JSON-LD when preferred #90

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Treora
Copy link
Contributor

@Treora Treora commented Aug 12, 2014

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.

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.
@Treora Treora changed the title Make store return JSON-LD when preferred [WIP] Make store return JSON-LD when preferred Aug 13, 2014
@Treora Treora mentioned this pull request Aug 20, 2014
5 tasks
@BigBlueHat
Copy link

@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!

@Treora
Copy link
Contributor Author

Treora commented Feb 18, 2015

@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.
I'm not too fond of how it constructs json-ld directly using dicts, but I don't know if there is a satisfying rdf library to use instead. I've also assumed a namespace (http://annotatorjs.org/ns/) which is only defined implicitly, by its usage in this code.
But all in all, I suppose it provides a basic implementation of the (still applicable?) OA draft spec. So if the goal is just to have some working example, just rebasing and merging could just do the trick.

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

Successfully merging this pull request may close these issues.

2 participants