Skip to content

Define number parsing #189

Open
Open

Description

@domenic

There are multiple number parsing algorithms on the platform:

It seems ideal to me if at least some of these could be shared. Maybe just between JSON and CSS, and HTML has extensions to it? I need to audit the potential differences.

Activity

  1. tabatkins commented on Jan 23, 2018

    @tabatkins
    Contributor

    Note: CSS and JSON also allow exponential notation (1e2 for 100, etc) in exactly the same way.

  2. tabatkins commented on Jan 23, 2018

    @tabatkins
    Contributor

    Ah, I lied - JSON and CSS are not completely identical. Per the JSON.org diagram, JSON does not allow unnecessary leading zeros (02.3 is disallowed) (besides the leading 0 in 0.XXX forms), and JSON doesn't allow a fraction without an integer part (the .XXX form).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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