Closed
Description
I previously created a GitHub issue and mailing list post on this topic, but walked away under the impression that there was no official solution. However, I recently stumbled across section 2.2 of the official CURIE documentation, which anticipated this exact issue! I’ll reproduce the relevant content here for convenience:
CURIEs and SafeCURIEs map to IRIs, but neither a CURIE nor a Safe_CURIE is an IRI or URI. Accordingly, CURIEs and Safe_CURIEs MUST NOT be used as values for attributes or other content that are specified to contain only URIs, IRIs, URI-references, IRI-references, etc. Specifications for particular attribute values or other content MAY be written to allow either CURIEs or IRIs (or URIs, etc.). The specifications for such languages MUST provide rules for disambiguation in situations where the same string could be interpreted as either a CURIE or an IRI. One way to do this is to require that all CURIEs be expressed as Safe_CURIEs, implying that all unbracketed strings are to be interpreted directly as IRIs.
For JSON-LD to adopt SafeCURIEs across the board would probably be a significant breaking change—something that I don’t want to treat lightly. However, given that work on JSON-LD is starting up again, I think it’s worth beginning a discussion.
"`@id`s are vulnerable to unwelcome expansion"
"How to mitigate accidental/unwelcome IRI expansion?"
"Ambiguities Between CURIEs and URIs"
"Reactivating the CG to work on updated versions of the specs"