Incorrect JSON-LD serialization when not in Node context #2034
Labels
Priority: low
Consider using when the issue would enhance what is available to the community, but does not block p
Repository:Islandora
Issues pertaining to the repository: https://github.com/Islandora/islandora
Repository:JsonLD
Issues pertaining to the repository: https://github.com/Islandora/jsonld
Subject: Linked Data
related to linked data. Consider also using metadata or modelling tags.
Subject: Metadata
related to metadata issues. Consider also using the search tag.
Type: bug
identifies a problem in the software with clear steps to reproduce
Type: discussion
Identifies a topic for conversation - may be similar to a question.
The Context Reactions that alter a node's JSON-LD representation depend on the Node Context being present.
If I go to http://localhost:8000/node/89?_format=jsonld
The "Dataset" type and the SameAs predicate were added via two context reactions that ship with Islandora, in JsonldSelfReferenceReaction.php and JsonldTypeAlterReaction.php.
However when I use Drupal's serializer service directly to get the node in JSON-LD format, I get:
Since the serializer service is pretty well-known, I think it's important to not have it generate different output depending on whether the node was loaded with a context or otherwise.
Generally I also don't think the added complexity gives us much that just writing a custom normalizer alter hook gives us.
I propose deprecating the JSONLD alter reactions and putting the Type based on field_external_uri value and "SameAs" predicates directly into the islandora module.
The text was updated successfully, but these errors were encountered: