Benoit Blanchon
044a4753d2
Rename StringCopier
to StringBuilder
2023-05-10 10:12:55 +02:00
Benoit Blanchon
37357086e2
Remove the zero-copy mode
...
After removing the string size from `VariantContent`, `deserializeJson()` and `deserializeMsgPack()` could not support NUL in strings in the zero-copy mode anymore.
Instead of adding a complicated warning in the documentation, I thought it was better to remove the zero-copy mode entirely.
The zero-copy mode has always been a source of bugs because many users used it without realizing it.
Also, the memory savings are smaller now that we deduplicate strings, so this feature should not be missed much.
2023-05-10 09:55:21 +02:00
Benoit Blanchon
167ea08c53
Pass StringNode*
to VariantData
2023-05-02 18:56:02 +02:00
Benoit Blanchon
86772d33bc
Rename VALUE_IS_OWNED_RAW
to VALUE_IS_RAW_STRING
2023-05-02 10:03:37 +02:00
Benoit Blanchon
806fa907ab
Always store serialized("string")
by copy ( #1915 )
2023-05-02 09:36:40 +02:00
Benoit Blanchon
95f5d9d134
Fix compatibility with the Blynk libary ( fixes #1914 )
...
Ported from 52d8a65cbc
2023-04-21 19:08:53 +02:00
Benoit Blanchon
03139a08af
Set default for ARDUINOJSON_ENABLE_PROGMEM
to 1
on AVR
...
Ported from 082ae69e86
2023-04-21 19:08:53 +02:00
Benoit Blanchon
461cdaa818
Allow using PROGMEM outside of Arduino ( fixes #1903 )
...
Ported from 40daf56b5a
2023-04-21 19:08:53 +02:00
Benoit Blanchon
dd46813dc0
Change naming convention from _member
to member_
( fixes #1905 )
...
Ported from 31ce648e63
2023-04-21 18:59:48 +02:00
Benoit Blanchon
5d796781fb
Increase coverage
2023-04-21 18:39:47 +02:00
Benoit Blanchon
003087406c
Reference-count shared strings
2023-04-21 16:11:54 +02:00
Benoit Blanchon
b7c8e0d25c
Decouple VariantData
from MemoryPool
2023-04-21 16:11:54 +02:00
Benoit Blanchon
d8f3058efa
Store the strings in the heap
2023-04-17 10:42:08 +02:00
Benoit Blanchon
6eb4f45fb9
Tests: ControllableAllocator controls reallocate()
too
2023-04-08 09:18:15 +02:00
Benoit Blanchon
b3132cac3a
Tests: add SpyingAllocator::clearLog()
2023-04-07 18:30:31 +02:00
Benoit Blanchon
d95a3bd19a
Tests: add TimebombAllocator
2023-04-07 18:28:46 +02:00
Benoit Blanchon
22e4f216c3
Tests: allow ArmoredAllocator to be called multiple times
2023-04-07 18:27:38 +02:00
Benoit Blanchon
e9850152a7
Tests: replace constants with sizeofString(n)
2023-04-07 14:50:54 +02:00
Benoit Blanchon
c4b879645a
Remove JsonDocument::capacity()
2023-04-03 09:51:43 +02:00
Benoit Blanchon
6afa6b647c
Test: Support failed allocations in SpyingAllocator
2023-04-03 09:51:10 +02:00
Benoit Blanchon
acd465b365
Test: change ControllableAllocator
into a decorator
2023-04-03 09:51:10 +02:00
Benoit Blanchon
e858570afb
Test: change SpyingAllocator
into a decorator
2023-04-03 09:51:09 +02:00
Benoit Blanchon
0643c2e708
Test: gather JsonDocument constructor and assignment tests
2023-04-03 09:51:09 +02:00
Benoit Blanchon
bcf1339e89
Test: split JsonDocument.cpp
into multiple files
2023-04-03 09:51:09 +02:00
Benoit Blanchon
dc463a2f72
Test: remove REQUIRE_JSON()
2023-04-03 09:51:09 +02:00
Benoit Blanchon
a7cdf638e7
Test: move ControllableAllocator
2023-04-03 09:51:09 +02:00
Benoit Blanchon
57810af2ac
Test: include deallocated size in allocator's log
2023-04-02 16:47:59 +02:00
Benoit Blanchon
2eb726b744
Test: add AllocatorLog
2023-04-02 16:47:59 +02:00
Benoit Blanchon
912137ccfb
Test: share SpyingAllocator
2023-04-01 10:34:48 +02:00
Benoit Blanchon
035c913c72
Remove ARDUINOJSON_ENABLE_STRING_DEDUPLICATION
2023-03-29 19:28:44 +02:00
Benoit Blanchon
3f43c2b816
Remove JSON_ARRAY_SIZE()
, JSON_OBJECT_SIZE()
, and JSON_STRING_SIZE()
2023-03-29 19:18:06 +02:00
Benoit Blanchon
0328f66340
Fix compatibility with GCC 5.2
2023-03-28 17:24:45 +02:00
Benoit Blanchon
b3eada9c7f
CI: restore build on GCC 5
2023-03-28 14:53:15 +02:00
Benoit Blanchon
5faa3df43f
MemoryPool
calls the Allocator
directly
2023-03-20 15:03:09 +01:00
Benoit Blanchon
540901e219
Merge DynamicJsonDocument
with JsonDocument
2023-03-20 14:49:51 +01:00
Benoit Blanchon
db9258bcd7
Remove BasicJsonDocument
2023-03-20 14:49:08 +01:00
Benoit Blanchon
24aaab6e3e
Add abstract Allocator
class
2023-03-20 14:47:27 +01:00
Benoit Blanchon
17a482a9b1
Remove StaticJsonDocument
2023-03-20 10:40:35 +01:00
Benoit Blanchon
5edd435fe9
Add a constructor to VariantData
2023-03-20 10:14:54 +01:00
Benoit Blanchon
c89a2025ce
Make string support generic (issue #1807 )
2023-03-13 12:19:05 +01:00
Benoit Blanchon
0f8698e655
Replace ARDUINOJSON_EXPANDX
with variadic macros ( #1820 )
2023-02-22 11:24:51 +01:00
Benoit Blanchon
b2b995edb3
Use delete
instead of hiding copy constructors and assignments ( #1820 )
2023-02-17 10:59:57 +01:00
Benoit Blanchon
33a4773fbd
Set clang-format standard to C++11 ( #1820 )
2023-02-16 11:51:02 +01:00
Benoit Blanchon
daa87e12dc
Update copyright notice
2023-02-16 11:45:01 +01:00
Benoit Blanchon
1b66a217bf
Replace ARDUINOJSON_NAMESPACE
with an inline namespace ( #1820 )
2023-02-14 10:04:48 +01:00
Benoit Blanchon
8f7211a50f
Remove ARDUINOJSON_HAS_NULLPTR
( #1820 )
2023-02-10 17:02:52 +01:00
Benoit Blanchon
2be4ee732a
Remove ARDUINOJSON_HAS_RVALUE_REFERENCES
( #1820 )
2023-02-10 17:02:52 +01:00
Benoit Blanchon
3bdedc9a2f
Remove ARDUINOJSON_HAS_LONG_LONG
( #1820 )
2023-02-10 17:02:52 +01:00
Benoit Blanchon
407fc2cd45
Drop support for C++98/C++03 ( closes #1820 )
2023-02-10 17:02:52 +01:00
Benoit Blanchon
62dea9d364
Reformat CMake files
2023-02-10 17:02:51 +01:00