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

possible api improvements #6

Open
1 of 5 tasks
travisstaloch opened this issue Jun 15, 2022 · 1 comment
Open
1 of 5 tasks

possible api improvements #6

travisstaloch opened this issue Jun 15, 2022 · 1 comment

Comments

@travisstaloch
Copy link
Owner

travisstaloch commented Jun 15, 2022

Ideas from sasuke420 discussion on discord:

  • an option to not care about the LSB of doubles
  • an option to store some numbers in 1 slot instead of 2, if they fit
  • an option to store some decimals exactly using some weird format including the base 10 exponent instead of as doubles, also in 1 slot
  • an option to be willing to parse numbers out of strings, if the person who made the json was a trickster who put them inside of string literals, but they are still actually numbers
  • 3 different options to assume fields will be in order and give nonsense results if they are not, assume fields will be in order and fall back to the current behavior if they are not, or use the current behavior (only affects parsing of structs)
@travisstaloch
Copy link
Owner Author

travisstaloch commented Oct 16, 2023

i started working on task 4 (parse numbers out of strings) above today in 00cb22e @sharpobject since you originally suggested this, maybe let me know if you have any thoughts about how to improve it.

i'm about to test this out in simdjzon-rpc where i need it for parsing 'id' fields which may be strings or integers. i'm thinking this will be an improvement over std.fmt.parseInt() which i'm currently using in that project.

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

No branches or pull requests

1 participant