Benoit Blanchon
ee02c0d573
Test extension slot allocation failure
2024-08-27 16:08:47 +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
7643dadaec
WIP
2024-08-27 14:40:24 +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
b5bcb37657
Use enable_if_t instead of enable_if
2024-08-27 10:00:09 +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
e682337655
Release VariantData resources explicitly before setting value
2024-08-26 15:09:56 +02:00
Benoit Blanchon
4ada3f849c
Decouple parseNumber() from VariantData
2024-08-25 16:46:55 +02:00
Benoit Blanchon
5dd203bca4
Rename SlotWithId to Slot
2024-08-25 15:04:39 +02:00
Benoit Blanchon
362201241f
Make MemoryPool generic
2024-08-25 14:58:23 +02:00
Benoit Blanchon
2be24eded8
Rename SlotWithId::slot() and VariantWithId::data() to ptr()
2024-08-25 14:54:45 +02:00
Benoit Blanchon
4327f72140
Remove VariantSlot
2024-08-25 14:45:59 +02:00
Benoit Blanchon
f7f1b9745d
Hide FreeSlot in MemoryPoolList
2024-08-25 14:39:18 +02:00
Benoit Blanchon
cec18177b0
Move sizeofArray() and sizeofObject()
2024-08-25 14:36:38 +02:00
Benoit Blanchon
f2894552f2
Rename VariantPool to MemoryPool
2024-08-25 14:36:38 +02:00
Benoit Blanchon
d3721cb122
Make VariantSlot a union. Include next slot id in VariantData
2024-08-24 19:20:39 +02:00
Benoit Blanchon
ab72bb8601
Rename flags_ to type_
2024-08-24 11:18:21 +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
a2b09bfbd2
Remove unused code
2024-08-23 15:28:44 +02:00
Benoit Blanchon
22dd4da3af
Set version to 7.1.0
2024-06-27 18:20:22 +02:00
Benoit Blanchon
b23ff65b99
Reduce MsgPack deserializer size
2024-06-18 13:51:33 +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
208e7a3304
Fix integer overflow in MsgPackDeserializer
2024-06-11 09:47:11 +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
f99b2d63f9
Make error message more readable in case of an invalid conversion
2024-05-23 14:01:30 +02:00
Benoit Blanchon
1db803bcd3
Add helpers for type traits, such as enable_if_t
2024-05-22 10:22:59 +02:00
Benoit Blanchon
04326d2655
Allow Converter<T>::toJson() to return a boolean as an optimization
2024-05-22 09:27:15 +02:00
Benoit Blanchon
9e0c56acc3
Replace ConverterNeedsWriteableRef with function_traits
2024-05-22 09:27:14 +02:00
Benoit Blanchon
60f9f7eff6
Move CollectionData::releaseSlot() to ResourceManager::freeSlot()
2024-05-17 17:10:45 +02:00
Benoit Blanchon
f1899d3049
Fix error resources_ may be used uninitialized
...
JsonArrayConst.hpp:29:56: error: 'array.ArduinoJson::V704HB22::JsonArrayConst::resources_' may be used uninitialized in this function [-Werror=maybe-uninitialized]
JsonObjectConst.hpp:62:56: error: 'null.ArduinoJson::V704HB22::JsonObjectConst::resources_' may be used uninitialized in this function [-Werror=maybe-uninitialized]
2024-05-16 17:47:07 +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
2c670e0148
Implement MsgPackBinary using raw strings and converters
2024-05-06 11:10:02 +02:00
Benoit Blanchon
002b07f0c5
Reduce the size of deserializeMsgPack()
2024-05-02 20:29:00 +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
cd4bf33132
Fix error "pasting X and Y does not give a valid preprocessing token"
2024-04-18 14:39:05 +02:00
Benoit Blanchon
2cfefe22ac
Add ARDUINOJSON_STRING_LENGTH_SIZE to the namespace name
2024-04-18 14:19:43 +02:00
RoboSchmied
0d43e51d48
Fix typo in "endianness"
...
Closes #2071
2024-03-26 13:43:07 +01:00
Benoit Blanchon
36e1eecc7d
Set version to 7.0.4
2024-03-12 09:40:46 +01:00
Benoit Blanchon
ca2f80aeaf
Add links to the documentation
2024-02-21 10:48:50 +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
46a807bd30
Remove unused NO_INLINE
2024-02-05 11:56:08 +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