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

Deserialize integers beyond 53bits as bigint #31

Open
innermatrix opened this issue Oct 10, 2024 · 2 comments
Open

Deserialize integers beyond 53bits as bigint #31

innermatrix opened this issue Oct 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@innermatrix
Copy link

import toml from 'smol-toml'
toml.parse('a=9223372036854775807')

Expected: { a: 9223372036854775807n }

Seen: Exception (Invalid TOML document: integer value cannot be represented losslessly)

@cyyynthia cyyynthia changed the title Poor handling of bigints Deserialize integers beyond 53bits as bigint Oct 10, 2024
@cyyynthia cyyynthia added the enhancement New feature or request label Oct 10, 2024
@cyyynthia
Copy link
Member

This is more of a feature req than a bug; the choice was to error for the time being to avoid silently converting to bigint by default (noisy vs silent approach). BigInt support is planned, eventually:tm:

@zombieyang
Copy link

Really need this

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

No branches or pull requests

3 participants