isamplesorg/metadata

Ensure IRI components are percent escaped

Closed this issue · 0 comments

"@id": "https://data.isamples.org/digitalsample/{0}/{1}".format(

The @id property of JSON-LD structures is an IRI [1] and hence RFC3987 applies. In particular, path elements must be percent encoded [2].

Although IGSN identifier values do not include characters that require encoding, other identifier schemes may, and hence since the identifier value is expressed as a path element of the IRI it should be percent encoded here.

This can be done with the python urllib.parse.quote standard method.

[1]: § 3.3 Node Identifiers
[2]: § 2.2 ABNF for IRI References and IRIs