Skip to content

64-bit number support #300

@gdamore

Description

@gdamore

It would be really nice to have support for receiving 64-bit numbers losslessly.

JavaScript doesn't handle these, but the JSON specification quite clearly states that any internal representation limits are just those, and not part of any specification. Consequently, in a language like C, it is quite possible and reasonable to pass around 64-bit values as native numbers instead of doing the encode and decode from string each time.

There are some JSON based APIs which actually do this, writing 64-bit IDs, or timestamps, or statistics, as numbers which might be larger than 53 bits of precision possible via double.

Right now, as it stands, cJSON cannot cope with that sort of API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions