Skip to content

How to get the literal value of a number? #1074

@grapland0

Description

@grapland0

For instance, for json content

{"value": 1.23456789234567892345678923456789234567892345678923456789}

I'd like to get a string-like 1.23456789234567892345678923456789234567892345678923456789 from parsed value.

This is useful not even for arbitrary precision floats, but for decimal floats. Number 0.1 has no accurate representation with IEEE754 binary float. Some users may want to pass this value as-is to their decimal float library, so they need the literal value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions