Commit Graph
577 Commits
Author SHA1 Message Date
Benoit Blanchon 57a9c50b38 Make ElementProxy and MemberProxy non-copyable 2024-11-25 10:46:21 +01:00
Benoit Blanchon 8110058729 Fix support for NUL characters in deserializeJson() 2024-11-17 15:40:21 +01:00
Benoit Blanchon f9fe8557f1 Set version to 7.2.1 2024-11-15 09:05:29 +01:00
Benoit Blanchon e007d71b4f Fix operator[](variant) ignoring NUL characters 2024-11-14 14:56:47 +01:00
Benoit Blanchon 1110d62128 Fix VLA support in JsonDocument::set() 2024-11-08 09:37:23 +01:00
Benoit Blanchon 0dd6231b3f Forbid deserializeJson(JsonArray|JsonObject, ...)
Closes #2135
2024-10-23 15:41:34 +02:00
Benoit Blanchon cd4b2b2463 Set version to 7.2.0 2024-09-18 10:48:50 +02:00
Benoit Blanchon f806a42cc2 Add support for escape sequence \'
Fixes #2124
2024-09-17 10:33:47 +02:00
Benoit Blanchon d92eee8736 Deprecate containsKey() in favor of doc["key"].is<T>()
See #2121
2024-09-06 17:32:09 +02:00
Benoit Blanchon 0278e94fce Set ARDUINOJSON_USE_DOUBLE to 0 by default on 8-bit architectures 2024-08-27 15:46:12 +02:00
Benoit Blanchon c0bebe35f1 Improve message when user forgets third arg of serializeJson() et al.
See #1449, #1491, #1543, #1665, and #2122
2024-08-27 12:22:53 +02:00
Benoit Blanchon e297932a98 Store 64-bit numbers (double and long long) in an additional slot
This change allows slots to be twices maller on 32-bit architectures.
See #1650 and #2103
2024-08-27 08:02:09 +02:00
Benoit Blanchon 09c89dcacf Store object members with two slots: one for the key and one for the value 2024-08-24 10:45:51 +02:00
Benoit Blanchon 22dd4da3af Set version to 7.1.0 2024-06-27 18:20:22 +02:00
Benoit Blanchon 556785dc1e Read MsgPack's 64-bit ints even if ARDUINOJSON_USE_LONG_LONG is 0 2024-06-18 13:50:50 +02:00
Benoit Blanchon e4f3fd8c91 Add support for MsgPack extension 2024-06-06 18:33:48 +02:00
Benoit Blanchon 5a60c55be7 Don't add partial objects when allocation fails
Fixes #2081
2024-05-23 18:36:24 +02:00
Benoit Blanchon aeb30ef307 Support ElementProxy and MemberProxy in JsonDocument's constructor 2024-05-15 13:37:33 +02:00
Benoit Blanchon 68a13117dc Allow using a JsonVariant as a key or index
Closes #2080
2024-05-14 21:06:02 +02:00
Benoit Blanchon 4d074840da Optimize deserializeMsgPack() 2024-05-01 18:00:59 +02:00
David Gauchard 82de20ee14 Make string support even more generic
Ported from 57354de831
Closes #2084
2024-05-01 14:06:30 +02:00
Aubrey (Sanae) 18a9a5b590 Add MsgPack bin8/bin16/bin32 support
Closes #2078
Closes #922
2024-04-29 16:01:10 +02:00
Benoit Blanchon 2cfefe22ac Add ARDUINOJSON_STRING_LENGTH_SIZE to the namespace name 2024-04-18 14:19:43 +02:00
Benoit Blanchon 36e1eecc7d Set version to 7.0.4 2024-03-12 09:40:46 +01:00
Benoit Blanchon f17fc055d3 Make JSON_STRING_SIZE(N) return N+1 to fix third-party code
ThingsBoard uses this macro to compute size of char arrays ಠ_ಠ
https://github.com/thingsboard/thingsboard-client-sdk/blob/v0.12.2/src/Helper.h#L38

Closes #2054
2024-02-18 20:00:25 +01:00
Benoit Blanchon 04ac53d114 Remove final from JsonArray, JsonObject, and JsonVariant
`final` breaks ThingsBoard ಠ_ಠ
https://github.com/thingsboard/thingsboard-client-sdk/blob/v0.12.2/src/RPC_Response.h#L10

See #2056.
This reverts commit 483a2c9101.
2024-02-18 20:00:24 +01:00
Benoit Blanchon 483a2c9101 Mark JsonArray, JsonObject, and JsonVariant as final
See #2056
2024-02-18 10:52:07 +01:00
Benoit Blanchon 848c0cdc7e Set version to 7.0.3 2024-02-05 13:34:38 +01:00
Benoit Blanchon cb0dc94db4 Remove most FORCE_INLINEs
I kept only the ones that had a positive impact on code size AND no negative impact on stack memory.

Fixes #2046
2024-02-05 11:48:27 +01:00
Benoit Blanchon 72642e3090 Fix compatibility with GCC 4.8
Closes #2045
2024-02-01 21:37:45 +01:00
Benoit Blanchon 296fe79bfd Stop using CollectionIterator in JsonSerializer
This reduces stack consumption and code size.
See  #2046
2024-02-01 10:24:00 +01:00
Benoit Blanchon 650d537b5d Improve error messages when using char or char*
See #2043
2024-01-26 10:34:49 +01:00
Benoit Blanchon 0435945a62 Set version to 7.0.2 2024-01-19 14:36:16 +01:00
Benoit Blanchon 1b143d383b Fix assertion poolIndex < count_ after JsonDocument::clear()
Fixes #2034
2024-01-16 10:10:43 +01:00
Benoit Blanchon 94783fdd2a Set version to 7.0.1 2024-01-10 21:14:07 +01:00
Benoit Blanchon a7bfc2212c Fix volatile bool serialized as 1 or 0
Ported from 5d1d2721d1
2024-01-10 14:03:12 +01:00
Benoit Blanchon 3571db6290 Remove unused files in the PlatformIO package 2024-01-04 18:01:52 +01:00
Benoit Blanchon cc42373367 Fix "no matching function" with JsonObjectConst::operator[]
Fixes #2019
2024-01-03 16:30:44 +01:00
Benoit Blanchon 9dc43d14f3 Set version to 7.0.0 2024-01-03 09:19:34 +01:00
Benoit Blanchon 3fa6b6e04f Fix typo in change log 2024-01-03 09:19:14 +01:00
Benoit Blanchon e93fd7657f Add a "Breaking changes" section to the changelog 2023-08-10 09:54:47 +02:00
Benoit Blanchon 7f459adc4b Remove createNestedArray() and createNestedObject() 2023-08-09 12:08:21 +02:00
Benoit Blanchon f422b7b37d Replace add() with add<T>() (add(T) is still supported) 2023-08-09 10:57:52 +02:00
Benoit Blanchon af6954c224 serializeXxx() sets std::string and String instead of appending 2023-07-31 18:37:35 +02:00
Benoit Blanchon 218a12ca46 Call shrinkToFit() in deserializeJson() and deserializeMsgPack() 2023-07-31 17:34:17 +02:00
Benoit Blanchon 43eed00cd9 Add deserializeXxx(JsonVariant, ...) (resolves #1226) 2023-07-29 12:05:18 +02:00
Benoit Blanchon db5b5f9ee2 Fix a typo in the changelog 2023-07-29 06:33:44 +02:00
Benoit Blanchon a8329564e2 Remove JsonDocument::garbageCollect() 2023-07-25 14:37:25 +02:00
Benoit Blanchon 00c9d8680a Remove memoryUsage() 2023-07-24 17:21:25 +02:00
Benoit Blanchon 5458e916ea Show a link to the doc when user passes an unsupported input type
Ported from 7eec01cdd6
2023-07-23 18:08:21 +02:00