Skip to content

Provide an option to allow (and ignore) additional keys in a JSON-LD document#63

Merged
Raphael-Gazzotti merged 1 commit intoopenMetadataInitiative:pipelinefrom
apdavison:allow-extra-keys
Oct 2, 2025
Merged

Provide an option to allow (and ignore) additional keys in a JSON-LD document#63
Raphael-Gazzotti merged 1 commit intoopenMetadataInitiative:pipelinefrom
apdavison:allow-extra-keys

Conversation

@apdavison
Copy link
Copy Markdown
Member

At present, if any additional keys are found in a JSON-LD document, a NameError is raised.

This PR adds an option ignore_unexpected_keys to the load() method to ignore such additional keys. The default is still to raise the NameError.

The motivation is to handle openMINDS JSON-LD documents generated by other tools, such as the EBRAINS Knowledge Graph, which adds extra keys in non-openMINDS namespaces, such as "http://schema.org/identifier".

@Raphael-Gazzotti Raphael-Gazzotti merged commit 09b53e0 into openMetadataInitiative:pipeline Oct 2, 2025
1 check passed
@apdavison apdavison deleted the allow-extra-keys branch October 6, 2025 13:58
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

Successfully merging this pull request may close these issues.

2 participants