Commit Graph
590 Commits
Author SHA1 Message Date
Benoit Blanchon deab127a2f Fix crash with tiny Flash strings (issue #2170) 2025-04-11 10:23:43 +02:00
Benoit Blanchon 96281de682 Set version to 7.4.0 2025-04-09 14:49:13 +02:00
Benoit Blanchon f0e84e4933 Fix support for const char[]
Fixes #2166
2025-04-09 08:55:09 +02:00
Benoit Blanchon 91397f9f06 Optimize storage of tiny strings (up to 3 characters) 2025-04-09 08:55:08 +02:00
Benoit Blanchon e03d8ae885 Set version to 7.3.1 2025-02-27 19:35:14 +01:00
Benoit Blanchon cb1dcfa5e4 Reduce code size 2025-02-27 11:13:50 +01:00
Benoit Blanchon 67dd3120e6 Fix conversion from static string to number 2025-02-27 11:01:51 +01:00
Benoit Blanchon 8f7e793f37 Set version to 7.3.0 2024-12-29 17:15:57 +01:00
Benoit Blanchon de05814294 Move public facing SFINAEs to template declarations 2024-12-23 17:44:52 +01:00
Benoit Blanchon e33e78d202 Rename undocumented JsonString::isLinked() to isStatic() 2024-11-26 14:32:50 +01:00
Benoit Blanchon ed5f890d28 Replace JsonString::Ownership with bool 2024-11-26 14:32:36 +01:00
Benoit Blanchon 8931651317 JsonString: change default ownership to Copied 2024-11-26 10:10:52 +01:00
Benoit Blanchon 594dc707cb Change string copy policy: only string literal are stored by pointer 2024-11-25 12:25:59 +01:00
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