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
Benoit Blanchon
727a1013ca
Recycle removed slots
2023-07-20 18:04:06 +02:00
Benoit Blanchon
0f319e7ca4
Remove capacity from JsonDocument's constructor
2023-07-18 09:08:55 +02:00
Benoit Blanchon
39e8b63746
Remove shallowCopy()
2023-07-17 11:20:46 +02:00
Benoit Blanchon
01b9b40bd2
Include ARDUINOJSON_SLOT_OFFSET_SIZE in the namespace name
...
Ported from 433fb4b961
2023-07-12 15:01:28 +02:00
Benoit Blanchon
c8517ee5b6
Fix double call to size() in serializeMsgPack()
...
Ported from afbcc2106e
2023-07-12 12:00:23 +02:00
Benoit Blanchon
23b01a89b1
Fix double lookup in to<JsonVariant>()
2023-07-05 16:18:35 +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
806fa907ab
Always store serialized("string") by copy ( #1915 )
2023-05-02 09:36:40 +02:00
Benoit Blanchon
003087406c
Reference-count shared strings
2023-04-21 16:11:54 +02:00