-
Notifications
You must be signed in to change notification settings - Fork 93
Remove restriction of 'identifier' to URIs #322
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
base: master
Are you sure you want to change the base?
Conversation
In practice, it is used to store non-URI identifiers, such as HAL IDs or (arguably ambiguous) names like here: https://github.com/codemeta/codemeta/blob/7e51f02426f1a6d9e86edb3e99024dd0999ef97e/codemeta.json#L4
837a675
to
480774f
Compare
Is this |
I think it is not breaking. It relaxes the constraints of the vocabulary |
I'd say breaking because this document: {
"http://schema.org/identifier": "foo bar"
} currently gets compacted to: {
"@context": "https://w3id.org/codemeta/3.0",
"schema:identifier": "foo bar"
} but after the change it would get compacted to: {
"@context": "https://w3id.org/codemeta/3.0",
"identifier": "foo bar"
}
Relaxing contraints of a format is a breaking change for readers. (And adding constraints is a breaking change for writers.) |
sorry, why would it remove/add a namespace? The only thing the id is doing is expecting an object, no? |
because
or any reader that compacts before parsing. Or for documents that are compacted before being sent to someone else. |
But identifier is mapped to schema:identifier per the context file... |
only for values that satisfy the type constraint |
right, so since we are relaxing the constraint, everything that worked before the change, will continue to work. Unless you have specified a test for your validator against that particular constraint... In any case, if you think this is something that should be delayed then ok. |
Why are you talking about a validator? This changes the behavior of any spec-compliant implementation of the JSON-LD compaction algorithm. |
Actually, it changes the behavior of the expansion algorithm too: {
"@context": {
"schema": "http://schema.org",
"identifier": {"@id": "schema:identifier", "@type": "@id"}
},
"identifier": "https://example.org"
} is expanded to: [
{
"schema:identifier": [
{
"@id": "https://example.org"
}
]
}
] while {
"@context": {
"schema": "http://schema.org",
"identifier": {"@id": "schema:identifier"}
},
"identifier": "https://example.org"
} is expanded to [
{
"schema:identifier": [
{
"@value": "https://example.org"
}
]
}
] as well as the semantics of the document (eg. when loaded in RDFlib), because the value is now a literal ( |
I did not realize about the resource changing its type from Resource (or Thing) to Literal, that is from:
to
Apologies! I got confused because I thought it was a namespace issue instead of a change of type in the literal. |
In practice, it is used to store non-URI identifiers, such as HAL IDs or (arguably ambiguous) names like here:
codemeta/codemeta.json
Line 4 in 7e51f02