Commit Graph
547 Commits
Author SHA1 Message Date
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
Benoit Blanchon d8f3058efa Store the strings in the heap 2023-04-17 10:42:08 +02:00
Benoit Blanchon c4b879645a Remove JsonDocument::capacity() 2023-04-03 09:51:43 +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 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 de9239caab Set version to 6.21.0 2023-03-14 21:05:56 +01:00
Benoit Blanchon c89a2025ce Make string support generic (issue #1807) 2023-03-13 12:19:05 +01:00
Benoit Blanchon 1b66a217bf Replace ARDUINOJSON_NAMESPACE with an inline namespace (#1820) 2023-02-14 10:04:48 +01:00
Benoit Blanchon 407fc2cd45 Drop support for C++98/C++03 (closes #1820) 2023-02-10 17:02:52 +01:00
Benoit Blanchon b33966c755 Set version to 6.20.1 2023-02-08 16:42:04 +01:00
Benoit Blanchon b350a96643 Remove explicit exclusion of as<char*>() and as<char>() (#1860)
If you try to call them, you'll now get the same error message as any unsupported type.
You could also add a custom converter for `char*` and `char`.
2023-01-18 22:10:37 +01:00
Benoit Blanchon 5094b84a46 Set version to 6.20.0 2022-12-26 17:35:54 +01:00
Benoit Blanchon 191fc5dff4 Remove support for naked char (was deprecated since 6.18.0) 2022-12-26 11:02:34 +01:00
Benoit Blanchon de725e0a4e Add documentation to most public symbols 2022-12-21 19:20:51 +01:00
Benoit Blanchon d602232b9f Update change log 2022-12-19 14:41:53 +01:00
Benoit Blanchon 0f85a55cac Implement VariantRefBase with a CRTP 2022-12-05 21:00:24 +01:00
Benoit Blanchon 92d6bae25c Remove ArrayIterator::internal() and ObjectIterator::internal() 2022-10-14 18:11:55 +02:00
Benoit Blanchon cf4436e581 Extract VariantProxy from ElementProxy and MemberProxy 2022-08-30 10:25:03 +02:00