Skip to content

Cannot encode long numbers #30

Closed
Closed

Description

@alvarolb

I cannot encode a unsigned long or unsigned long long value without casting it to int, with its corresponding overflow. It is required, i.e., for storing a timestamp in milliseconds from epoch.

Activity

  1. nlohmann commented on Jan 18, 2015

    @nlohmann
    Owner

    That is indeed a problem. I try to fix it soon.

  2. nlohmann commented on Jan 21, 2015

    @nlohmann
    Owner

    I changed the data type for integers to int64_t, so numbers between -9223372036854775808 and 9223372036854775807 can be stored and parsed. This should close this issue.

  3. added a commit that references this issue on May 7, 2021
  4. added a commit that references this issue on Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions