smol-toml icon indicating copy to clipboard operation
smol-toml copied to clipboard

Deserialize integers beyond 53bits as bigint

Open innermatrix opened this issue 1 year ago • 2 comments

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

Expected: { a: 9223372036854775807n }

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

innermatrix avatar Oct 10 '24 14:10 innermatrix

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:

cyyynthia avatar Oct 10 '24 15:10 cyyynthia

Really need this

zombieyang avatar Oct 23 '24 02:10 zombieyang