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

use the JSON primitive types for Boolean, Integer, Number in compaction output #554

Open
fennibay opened this issue Jun 17, 2024 · 0 comments

Comments

@fennibay
Copy link

fennibay commented Jun 17, 2024

Currently JSON-LD compaction always outputs the values as strings, even when the @type is specified to be a primitive type such as xsd:boolean, xsd:integer and xsd:double.

It would be nicer for JSON parsers that such values would be available as native JSON Booleans, Integers and Numbers.

Basically I'm proposing to introduce a useNative flag in compaction options, similar to fromRdf and Normalize.

See also:

edit: removed Null from the proposal, that doesn't have a corresponding xsd type.

@fennibay fennibay changed the title use the JSON primitive types for Boolean, Integer, Number and Null in compaction output use the JSON primitive types for Boolean, Integer, Number in compaction output Jun 17, 2024
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

1 participant