Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot encode long numbers #30

Closed
alvarolb opened this issue Jan 17, 2015 · 2 comments
Closed

Cannot encode long numbers #30

alvarolb opened this issue Jan 17, 2015 · 2 comments

Comments

@alvarolb
Copy link

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.

@nlohmann
Copy link
Owner

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

@nlohmann
Copy link
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.

GerHobbelt pushed a commit to GerHobbelt/nlohmann-json that referenced this issue May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants