Skip to content

Improve LexicalAnalyzer number parsing #8344

Open
@mary-georgiou-sonarsource

Description

Currently, the LexicalAnalyzer class is parsing JSON integral numbers as double.
Considering that numbers in JSON can be an infinite series of digits (see specification) we should refactor the ReadNumberValue method to use long and BigInteger for integral, and double for decimals.
See draft of refactoring here.

This change should be thoroughly tested.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Type: CleanupImprove and cleanup code base

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions