Skip to main content
+ link to docs.
Source Link
Edgar Bonet
  • 45.2k
  • 4
  • 42
  • 81

I didn't try myself, but just by looking at the docs I suggest you try:

  1. Adding

    #define ARDUINOJSON_USE_LONG_LONG 1
    

    at the top of the sketch, before including ArduinoJson.h.

  2. Declare CurrentUpdatedMS and CurrentUpdatedMS as either unsigned long long or uint64_t.

Edit: To answer the question in the comment:

When you said you looked at the docs where did you check?

I had to follow a (not so simple) path: Deserialization tutorialJsonDocument::operator[]JsonVariantJsonVariant::as<T>(). This last page states that the method as<unsigned long long>() “may require ARDUINOJSON_USE_LONG_LONG”. Unfortunately, the macro is not linked, so I have to search for it and found ARDUINOJSON_USE_LONG_LONG.

I didn't try myself, but just by looking at the docs I suggest you try:

  1. Adding

    #define ARDUINOJSON_USE_LONG_LONG 1
    

    at the top of the sketch, before including ArduinoJson.h.

  2. Declare CurrentUpdatedMS and CurrentUpdatedMS as either unsigned long long or uint64_t.

I didn't try myself, but just by looking at the docs I suggest you try:

  1. Adding

    #define ARDUINOJSON_USE_LONG_LONG 1
    

    at the top of the sketch, before including ArduinoJson.h.

  2. Declare CurrentUpdatedMS and CurrentUpdatedMS as either unsigned long long or uint64_t.

Edit: To answer the question in the comment:

When you said you looked at the docs where did you check?

I had to follow a (not so simple) path: Deserialization tutorialJsonDocument::operator[]JsonVariantJsonVariant::as<T>(). This last page states that the method as<unsigned long long>() “may require ARDUINOJSON_USE_LONG_LONG”. Unfortunately, the macro is not linked, so I have to search for it and found ARDUINOJSON_USE_LONG_LONG.

Source Link
Edgar Bonet
  • 45.2k
  • 4
  • 42
  • 81

I didn't try myself, but just by looking at the docs I suggest you try:

  1. Adding

    #define ARDUINOJSON_USE_LONG_LONG 1
    

    at the top of the sketch, before including ArduinoJson.h.

  2. Declare CurrentUpdatedMS and CurrentUpdatedMS as either unsigned long long or uint64_t.