430 Commits

Author SHA1 Message Date
Benoit Blanchon 0a42f9529f Mute clang-tidy warnings 2026-03-02 19:26:36 +01:00
Benoit Blanchon 2273e641b9 Fix buffer overrun in make_float()
Fixes #2220
2026-03-02 19:26:28 +01:00
Benoit Blanchon 7fb0e2f326 Update copyright year 2026-03-02 19:25:22 +01:00
Benoit Blanchon 8110058729 Fix support for NUL characters in deserializeJson() 2024-11-17 15:40:21 +01:00
Benoit Blanchon 7946ebe1a3 Wandbox: compile with gcc-head 2024-11-15 09:13:00 +01:00
Benoit Blanchon e007d71b4f Fix operator[](variant) ignoring NUL characters 2024-11-14 14:56:47 +01:00
Benoit Blanchon 67a512a923 Clean up tests of adaptString() 2024-11-14 14:22:51 +01:00
Benoit Blanchon 31253dbe13 Add more tests with VLAs 2024-11-08 09:37:49 +01:00
Benoit Blanchon 1110d62128 Fix VLA support in JsonDocument::set() 2024-11-08 09:37:23 +01:00
Benoit Blanchon c6c0649d70 Replace typedef with using 2024-10-23 15:54:08 +02:00
Benoit Blanchon 61ec2c4f95 Reduce boilerplate for failing build tests 2024-10-23 15:47:59 +02:00
Benoit Blanchon 0dd6231b3f Forbid deserializeJson(JsonArray|JsonObject, ...)
Closes #2135
2024-10-23 15:41:34 +02:00
Benoit Blanchon 20219d74f0 Tests: don't link FailingBuilds with catch 2024-10-23 15:04:52 +02:00
Benoit Blanchon 48ee4a178b Use a const reference in is_convertible() 2024-09-21 09:22:12 +02:00
Benoit Blanchon f806a42cc2 Add support for escape sequence \'
Fixes #2124
2024-09-17 10:33:47 +02:00
Benoit Blanchon c1a507c158 Set ARDUINOJSON_POOL_CAPACITY from ARDUINOJSON_SLOT_ID_SIZE
This avoids the integer overflow when `ARDUINOJSON_SLOT_ID_SIZE=1` on 64-bit architectures.
2024-09-11 21:08:51 +02:00
Benoit Blanchon a1809d0f31 Replace sizeof(VariantData) with sizeof(SlotData) 2024-09-10 18:26:58 +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 3b64197869 MsgPackDeserializer: check extension allocation result 2024-09-04 14:34:02 +02:00
Benoit Blanchon 1f7a3f3174 JsonDeserializer: use float when the value has few digits 2024-09-04 14:33:14 +02:00
Benoit Blanchon fd6314e132 Move some numbers tests to use_double_0.cpp 2024-09-04 14:29:19 +02:00
Benoit Blanchon e4e2557b76 Move test of decomposeFloat() 2024-09-03 13:27:39 +02:00
Benoit Blanchon 3b6bf45b8a Serialize float with less decimal places than double 2024-09-03 11:44:35 +02:00
Benoit Blanchon 33452c1f37 Test JsonVariant::as<T>() with extension slots 2024-08-27 16:08:47 +02:00
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 b4a5b053ca Merge conf_test for linux and windows
This reverts commit 83516e1740.
2024-08-27 08:03:55 +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 4ada3f849c Decouple parseNumber() from VariantData 2024-08-25 16:46:55 +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 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 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 386105be90 Allocate slot before key 2024-08-23 15:27:46 +02:00
Benoit Blanchon 83516e1740 Split conf_test between linux and windows 2024-08-23 15:24:45 +02:00
Benoit Blanchon 55c3b9b3a7 CI: update macOS runner to macos-13 2024-06-18 13:51:40 +02:00
Benoit Blanchon e34c27723a Fix build on modern compilers 2024-06-18 13:51:40 +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 45611924f3 Tests: add user-defined literal ""_s for std::string 2024-06-07 09:35:45 +02:00
Benoit Blanchon e4f3fd8c91 Add support for MsgPack extension 2024-06-06 18:33:48 +02:00
Benoit Blanchon aec642be20 Rename tests in MixedConfiguration 2024-06-06 18:26:16 +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 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 0fe202af03 CI: don't build fuzzers with Clang 11
Clang 11 fails on GitHub Actions with the following error:
ERROR: UndefinedBehaviorSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22)
Sanitizer CHECK failed: /build/llvm-toolchain-11-mnvtwk/llvm-toolchain-11-11.1.0/compiler-rt/lib/sanitizer_common/sanitizer_common.cpp:54 ((0 && "unable to mmap")) != (0) (0, 0)
2024-05-16 17:47:07 +02:00
Benoit Blanchon d486157a9e CMake: fix detection of GCC 4.8 2024-05-16 17:47:07 +02:00