Skip to content

Should we consider -0 as special number? #887

@nvborisenko

Description

@nvborisenko

script.SpecialNumber = "NaN" / "-0" / "Infinity" / "-Infinity";

-0 is valid number in json. If BiDi requires it to be String, then consumers will write extra code to serialize/deserialize this "-0" special case. If -0 would be a normal number, then serialization/deserialization properly handles it out of the box, including NaN, Infinity and -Infinity.

Note: Firefox properly handles both -0 and "-0", Chromium works only with "-0" and doesn't allow -0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions