swift-json
swift-json copied to clipboard
`JSON.Node(parsing:)` throws an error when a fractional number is too long
JSON.Node(parsing:) throws UnexpectedValueError() when a fractional number is too long, when, ignoring the decimal point, it cannot fit inside UInt64:
// Error
[1.00000000000000000000]
// No error
[1.0000000000000000000]
My code parses JSON provided by a third-party, so I cannot change the format. The fractional values I receive aren't all zero; I just wanted to indicate that the problem occurs even when the factional part could be dropped without any loss of precision.