Skip to content

Elaborate on handling of JSON builtin types integer and double #387

Open
@VladimirAlexiev

Description

@VladimirAlexiev

The spec doesn't describe explicitly enough what happens with JSON builtin types integer and double.

  1. By using a native JSON type such as number, true, or false.
{"@context":{"@vocab":"http://example.org/"},
  "pi": 3.14, "two": 2.0000000000000001}
  • remove one decimal zero and you get ex:two "2.000000000000001E0"^^xsd:double which means the datatype varies with the lexical precision
  • In contrast, Turtle is consistent: 2.0 and 2.0000000000000001 mean xsd:decimal

@msporny @gkellogg
I think the spec should be more explicit what implicit conversions are applied to JSON builtin types, and give some warnings about the examples above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EditorialUsed by the errata managementErrataUsed by the errata managementclass-2Class-2 change

    Type

    No type

    Projects

    Status

    Errata

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions