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

Serializing literal subjects returns invalid results #329

Open
joachimvh opened this issue Mar 2, 2023 · 0 comments · May be fixed by #330
Open

Serializing literal subjects returns invalid results #329

joachimvh opened this issue Mar 2, 2023 · 0 comments · May be fixed by #330

Comments

@joachimvh
Copy link

Copy/pasting from CommunitySolidServer/CommunitySolidServer#1582 (comment)

  const n3 = `"1"^^<http://www.w3.org/2001/XMLSchema#boolean> <http://example.com/p> <https://example.com/s> .`;
  const parser = new Parser({ format: 'text/n3' });
  const store = new Store(parser.parse(n3));
  const writer = new Writer({ format: 'text/turtle' });
  writer.addQuads(store.getQuads(null, null, null, null));
  writer.end((error, result): void => console.log(result));

Outputs

"1"^^http://www.w3.org/2001/XMLSchema#boolean <http://example.com/p> <https://example.com/s>.

Which could perhaps be excused in that it is invalid turtle so behaviour is undefined. But the same result occurs when using text/n3 format for the writer, while this is valid N3.

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 a pull request may close this issue.

1 participant