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

Use Case: @context is always a simple "label": "URI" with no namespaces or indirection #10

Closed
ptsefton opened this issue Apr 12, 2019 · 4 comments
Labels
use-case A (potential) use-case for ROLite creation, consumption or integration

Comments

@ptsefton
Copy link
Contributor

As a non-professional developer or Research Software Engineer, I want to be able to rely on context always a simple {"label": "URI"} with no namespaces or indirection, so that I don't have to understand and write code to deal with all the different ways that @context can be expressed.

Context for this: There are libraries for processing JSON-LD in Python and Javascript/Node.js but they DO NOT have features for resolving context labels, only high level operations like "Flatten".

NOTE: DataCrate already does it this way.

@stain
Copy link
Contributor

stain commented Jul 30, 2019

Just a comment that I think this makes the JSON quite verbose if we don't include @type: @id where possible (basically any object/URI reference) - combined with a flattened JSON-LD it means we are forced to always use:

"creator": [ { "@id": "http://orcid.org/0000-0002-1825-0097"}, 
                  { .. } ]

For comparison the schema.org context has type: @id only where the property is unambiguously URI or object; see(https://gist.github.com/stain/ddffb5a130b0c50b8beff2c1d02669b6 -- should we not try to be as compatible with schema.org as possible? (Now if you load "our" JSON-LD with "their" context you will get several of these wrong)

On the other side, lack of @type: @id in means if someone accidentally does "creator": "Josiah Carberry" there is no magic in the @context that turns that into http://example.com/Josiah Carberry - in fact it would still be somewhat valid schema.org. Another is that it is straight in your face being an "identifier" and that there won't be two different ways to do the same thing.

@ptsefton
Copy link
Contributor Author

We decided not to do it the way I was suggesting in this issue - the default is this:

{"@context": "https://raw.githubusercontent.com/ResearchObject/ro-crate/master/docs/0.2-DRAFT/context.json"}

That means that the way the @context is structure is up to us. I have suggested that we might want to define everything as a @list see #26.

@ptsefton
Copy link
Contributor Author

ptsefton commented Aug 1, 2019

But we need to document the process of extending the default context with new terms.

@ptsefton
Copy link
Contributor Author

This has been dealt with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
use-case A (potential) use-case for ROLite creation, consumption or integration
Projects
None yet
Development

No branches or pull requests

2 participants