You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
edit: removed Null from the proposal, that doesn't have a corresponding xsd type.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: