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

JSON-LD examples? #19

Open
stain opened this issue Oct 25, 2017 · 3 comments
Open

JSON-LD examples? #19

stain opened this issue Oct 25, 2017 · 3 comments

Comments

@stain
Copy link

stain commented Oct 25, 2017

JSON-LD lends itself well to Nanopublications. See for instance https://gist.github.com/stain/c2ad32ef4423b4814e83c2821bb03506 where I tried to reshape http://purl.org/np/RAW0X-iaUqouIVNNVYHBqbn5_LrVf2m3tv9l9K6B23tok as a nested JSON-LD structure that could also be consumed by non-RDF-aware consumers.

(BTW, that nanopub has somehow added #head also in the name of the nanopublication itself which I took the liberty to fix for the example)

@stain
Copy link
Author

stain commented Oct 25, 2017

See also discussions about Nanopubs on prov-comments

@tkuhn
Copy link
Member

tkuhn commented Oct 25, 2017

Yes, JSON-LD examples would be nice. Did you notice that some nanopub servers actually give you JSON-LD, like here: http://np.inn.ac/RAW0X-iaUqouIVNNVYHBqbn5_LrVf2m3tv9l9K6B23tok.jsonld.txt

Sesame doesn't seem to do any prettification though.

I don't understand what you mean by the #head in the name of the nanopub. The given nanopub has just http://purl.org/np/RAW0X-iaUqouIVNNVYHBqbn5_LrVf2m3tv9l9K6B23tok as its identifier (without #head).

@stain
Copy link
Author

stain commented Oct 26, 2017

Ah, yes, I see http://purl.org/np/RAW0X-iaUqouIVNNVYHBqbn5_LrVf2m3tv9l9K6B23tok correctly now. All praise TriG syntax for readability :-)

Yes, I used that JSON-LD output as starting point; and we could use compaction against a common or generated JSON-LD @context - could that have its own Trusted URI to ensure it is unchanged - or do we just include it explicitly as we do with the @prefixes?

We could in theory in the nanopub server use JSON-LD Framing as the latest draft supports named graphs, although I am not sure which implementations support this yet.

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

No branches or pull requests

2 participants