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

BlankNode prefix missing in value #336

Closed
MarcusElevait opened this issue Mar 22, 2023 · 2 comments
Closed

BlankNode prefix missing in value #336

MarcusElevait opened this issue Mar 22, 2023 · 2 comments

Comments

@MarcusElevait
Copy link

Is there a reason, why the prefix of a BlankNode id is cut of in the value of the BlankNode?
image

We're currently try to convert the parsed output to jsonld with the jsonld library and lists are not converted properly and from what i have seen during my research is that this missing prefix could be the problem.

@jeswr
Copy link
Collaborator

jeswr commented Mar 22, 2023

It is the same reason that Literals don't contain starting and ending quotes " in their value and NamedNodes don't include angular brackets in their value. The value is not meant to assist with serialization, that is the job of the serializer to do it correctly.

You will find that other libraries like rdf-data-factory will have exactly the same behavior.

In the case of the jsonld library it has never been properly RDF/JS compatible - and the issue you point out is a problem on their end. You can see here that the Inrupt libraries are doing a conversion when the jsonld parser is used https://github.com/inrupt/solid-client-js/blob/cf381af7eb0ca77853d90aa2ef49013986837eed/src/formats/jsonLd.ts#L120-L121. We are migrating to use jsonld-streaming-parser at the moment which doesn't have this issue https://github.com/inrupt/solid-client-js/pull/1914/files.

@MarcusElevait
Copy link
Author

Ah okay, thanks for pointing this out. This is really bad news, because as long as the jsonld library is not compliant with the specification, we can't trust our process when using multiple libraries for multiple conversion steps.
I will close this issue then :-)

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

No branches or pull requests

2 participants