Skip to content

JSONValue should represent integers with a string #17

@schveiguy

Description

@schveiguy

Instead of storing the json number value as an integer or float, store it as a string, and then let the user decide how to read it.

This could potentially cause problems if the json stream is transient, meaning we would have to make a copy of the string.

Potentially, if we know the string is an integer and fits within an int, then we could eagerly parse it.

Otherwise, we can store numbers using a SSO string. Currently the union contains a string, which is 16 bytes. So a 16 byte character array is possible without allocating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions