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

Type change to long long #465

Closed
b17460904 opened this issue Mar 7, 2017 · 4 comments
Closed

Type change to long long #465

b17460904 opened this issue Mar 7, 2017 · 4 comments
Labels

Comments

@b17460904
Copy link

I want to using unix millisecond timestamp as Jason vale,but it seems like the type is long, it will overflow, how to change long type to long long type? Thanks.

@bblanchon
Copy link
Owner

bblanchon commented Mar 7, 2017

Hello @b17460904,

You can define ARDUINOJSON_USE_LONG_LONG to 1 to switch to long long.

@b17460904
Copy link
Author

b17460904 commented Mar 8, 2017

Hi, bblanchon,

Thank for your help. After define ARDUINOJSON_USE_LONG_LONG to 1, the program have an error " /Parse.hpp:50:30: error: 'strtoull' was not declared in this scope return strtoull(s, NULL, 10);".
Are there any criteria for using long long format ?
I'm trying to use Arduino Mega + WiFi101 shield as socket client to sending Jason format string, one of the key:value pair is unixtime_ms : long long.

@bblanchon
Copy link
Owner

Hi @b17460904,

This means that the Arduino Core for AVR has not been updated for long long.

I plan on dropping strtoul() in the next revision anyway.
Until then, I'm afraid I don't have any workaround 😞

@b17460904
Copy link
Author

Hi @bblanchon ,

OK, I Know. Thanks for your kindly response.

bblanchon added a commit that referenced this issue Mar 25, 2017
`char` is now treated as an integral type (issue #337, #370)
Repository owner locked and limited conversation to collaborators Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants