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

JsonDecoder and JsonCodec classes need more detail on how they handle numbers #46682

Open
Hixie opened this issue Jul 21, 2021 · 1 comment
Open
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-convert type-documentation A request to add or improve documentation

Comments

@Hixie
Copy link
Contributor

Hixie commented Jul 21, 2021

JSON and Dart-for-web do not distinguish between integers and doubles, but the Dart VM does. The JsonDecoder and JsonCodec API docs should explain how this is bridged (e.g. do all numbers become doubles?).

@mit-mit mit-mit added the area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. label Jul 22, 2021
@lrhn lrhn added type-documentation A request to add or improve documentation library-convert labels Jul 26, 2021
@lrhn
Copy link
Member

lrhn commented Jul 26, 2021

In short: All JSON numbers are parsed as by num.parse. That goes for both Dart-for-web and VM, but on the web all integers are also doubles, so it's not as visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-convert type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

3 participants