Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Support parsing JSON number as RawNumber type #61

Open
liuq19 opened this issue Apr 18, 2023 · 0 comments
Open

Proposal: Support parsing JSON number as RawNumber type #61

liuq19 opened this issue Apr 18, 2023 · 0 comments
Labels

Comments

@liuq19
Copy link
Collaborator

liuq19 commented Apr 18, 2023

In order to parse JSON numbers with full precision and improve parsing performance, we propose adding a new RawNumber type for representing parsed JSON number values.

The design of this feature includes the following steps:

  1. Add a new kRawNumber enum to represent JSON number values, and add a RawNumberclass to distinguish it from stringview type.
  2. Provide support for construct, modifying, copying, and comparing RawNumber values. Especially, validate the number in construct and set API, because the number is from the user and maybe invalid numbers
  3. Use IsRawNumber to check for the presence of a RawNumber, while IsNumber continues to check for numeric types.

Implementation branch: #60
Status: To be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant