Skip to content
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

Setting ASSUME_TARGET_TYPE should allow deserializing objects containing only id #69

Closed
ledsoft opened this issue Aug 15, 2024 · 0 comments · Fixed by #70
Closed

Setting ASSUME_TARGET_TYPE should allow deserializing objects containing only id #69

ledsoft opened this issue Aug 15, 2024 · 0 comments · Fixed by #70

Comments

@ledsoft
Copy link
Contributor

ledsoft commented Aug 15, 2024

When an object contains only id like the following

{
  "@id": "http://example.com/object"
}

JB4JSON-LD assumes it is a reference to a fully serialized object. If it does not find one, it throws an UnresolvedReferenceException at the end of deserialization. However, when ASSUME_TARGET_TYPE is set to true, it should be possible to use such objects and deserialize them as objects of the target type having only identifier set.

To prevent interference with the reference resolution algorithm, these objects should be created only after all references are resolved and there still remain potential pending references.

ledsoft added a commit that referenced this issue Aug 26, 2024
ledsoft added a commit that referenced this issue Aug 26, 2024
…id) when ASSUME_TARGET_TYPE is configured.
@ledsoft ledsoft linked a pull request Aug 26, 2024 that will close this issue
ledsoft added a commit that referenced this issue Aug 26, 2024
ledsoft added a commit that referenced this issue Aug 26, 2024
…id) when ASSUME_TARGET_TYPE is configured.
@ledsoft ledsoft closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant