Commit Graph

50 Commits

Author SHA1 Message Date
Benoit Blanchon
62e83133cd Remove JsonDocument::data() and JsonDocument::memoryPool() 2022-08-09 10:38:36 +02:00
Benoit Blanchon
84b7037b3e Add VariantAttorney 2022-07-07 14:32:43 +02:00
Benoit Blanchon
c5838a876b Remove getElement(), getOrAddElement(), getMember(), and getOrAddMember() 2022-07-07 14:32:43 +02:00
Benoit Blanchon
758580bfb6 Rename addElement() to add() 2022-07-07 14:32:43 +02:00
Benoit Blanchon
cd8373ad32 Change link() to shallowCopy() (issue #1343)
Instead of storing a pointer, the function copies the `VariantData`.

Benefits:
* smaller code
* no impact on programs that don't use this feature

Drawbacks:
* changes to the original variant are not always reflected on the copy
* modifying the original from the shallow copy leads to UB
2022-07-05 17:07:43 +02:00
Benoit Blanchon
5b06b1564e Remove undocumented accept() functions 2022-07-03 17:38:03 +02:00
Benoit Blanchon
77b4270d97 Remove Visitable 2022-07-03 15:37:08 +02:00
Benoit Blanchon
3d6c328a4f Add JsonVariant::link() (resolves #1343) 2022-04-27 15:08:13 +02:00
Benoit Blanchon
7b19a4b6e7 Add getMemberConst() and getElementConst() 2022-04-27 15:07:26 +02:00
Benoit Blanchon
fc9d8aa31e Implement nesting() out of VariantData 2022-04-07 21:11:31 +02:00
Benoit Blanchon
bf5d0c790c Add implicit conversion from JsonDocument to JsonVariant 2022-03-23 17:17:35 +01:00
Benoit Blanchon
af18994deb Update copyright notice 2022-01-01 10:01:05 +01:00
Benoit Blanchon
0f529a3587 Renamed undocumented function isUndefined() to isUnbound() 2021-12-16 14:55:26 +01:00
Benoit Blanchon
ca24ed48f5 Separate string adapter from storage policy 2021-12-07 16:08:44 +01:00
Benoit Blanchon
4073b52c00 Changed return type of convertToJson() and Converter::toJson() to void 2021-07-23 15:11:48 +02:00
Benoit Blanchon
6b8e93e05e clang-tidy: fixed "uninitialized field" in VariantData 2021-06-04 11:36:20 +02:00
Benoit Blanchon
337864618c Reversed parameters of convertToJson() and convertFromJson()
Now the order matches copyArray(): source first, destination second.
2021-04-28 10:25:39 +02:00
Benoit Blanchon
d5d2209d09 Added "https://" prefix to all URLs so they are clickable in VS Code 2021-03-29 19:35:25 +02:00
Benoit Blanchon
d7f5b56ca4 Added support for custom converters (closes #687) 2021-03-20 14:52:47 +01:00
Benoit Blanchon
e4ce75e20c Simplified JsonVariant::as<T>() to always return T 2021-03-08 19:33:52 +01:00
Benoit Blanchon
3aab36fec2 Changed JsonVariantConst::is<JsonArray/JsonObject>() to return false (closes #1412) 2021-02-25 19:19:23 +01:00
Benoit Blanchon
c70a491f59 Made JsonDocument's destructor protected (fixes #1480) 2021-01-27 10:00:10 +01:00
Benoit Blanchon
97b7161d78 Update copyright notice for 2021 2021-01-25 09:14:15 +01:00
Benoit Blanchon
8d37939086 Added JsonDocument::overflowed() (closes #1358) 2020-09-05 13:44:40 +02:00
Benoit Blanchon
5ab53f42b2 Added a return value to visitors 2020-08-29 18:40:27 +02:00
Benoit Blanchon
9cb0ddb5e7 Removed the copy-constructor of JsonDocument (issue #1189) 2020-03-05 13:46:45 +01:00
Benoit Blanchon
0853b04589 Changed BasicJsonDocument's copy-constructor to copy the capacity 2020-03-02 12:39:29 +01:00
Benoit Blanchon
d8724e0a0b Changed the array subscript to automatically add missing elements 2020-02-20 08:59:25 +01:00
Benoit Blanchon
f9cfea244a Updated copyright notice 2020-01-09 15:48:38 +01:00
Benoit Blanchon
062c1c13b5 Added BasicJsonDocument::shrinkToFit() 2019-11-07 15:40:20 +01:00
Benoit Blanchon
6da6f921cd Fixed dangling reference in MemberProxy and ElementProxy (fixes #1120) 2019-10-30 19:09:21 +01:00
Benoit Blanchon
fcbec6eb6d Use absolute instead of relative includes (fixes #1072) 2019-08-26 11:57:57 +02:00
Benoit Blanchon
aba42faf69 Added operators == and != for JsonDocument 2019-07-19 10:23:06 +02:00
Benoit Blanchon
2507ee2e56 Fixed assignment of JsonDocument to JsonVariant (issue #1023) 2019-06-25 08:56:14 +02:00
Benoit Blanchon
6ec5ba521b Added JsonVariant::containsKey() 2019-03-22 21:58:12 +01:00
Benoit Blanchon
c8e49a7e4e Added JsonDocument::containsKey() (issue #938) 2019-03-22 08:40:46 +01:00
Benoit Blanchon
c9d6bd76c9 Added JsonDocument::remove() and JsonVariant::remove() 2019-02-25 13:21:10 +01:00
Benoit Blanchon
e22e62d184 Added JsonDocument::size() 2019-02-25 11:07:01 +01:00
Benoit Blanchon
e9b4c6289b Disambiguated the name get() with getElement() and getMember() 2019-02-15 15:53:53 +01:00
Benoit Blanchon
c3f71c1a99 Updated copyright year to 2019 2019-02-15 13:32:04 +01:00
Benoit Blanchon
b184af6d00 User can now use a JsonString as a key or a value 2019-01-29 17:00:11 +01:00
Benoit Blanchon
6f55d1e58f JsonVariant automatically promotes to JsonObject or JsonArray on write 2019-01-29 14:09:09 +01:00
Benoit Blanchon
933a66a070 Added JsonDocument::operator[] 2019-01-23 11:43:29 +01:00
Benoit Blanchon
4167b11434 Create or assign a JsonDocument from a JsonArray/JsonObject/JsonVariant 2019-01-23 10:47:20 +01:00
Benoit Blanchon
2a3b51ac3a Fixed uninitialized variant in JsonDocument 2019-01-20 14:35:22 +01:00
Benoit Blanchon
e633292df1 Replaced JsonDocument::nestingLimit with a param to deserializeJson() 2019-01-19 14:45:16 +01:00
Benoit Blanchon
30b94493bb Added nesting() to JsonArray, JsonDocument, JsonObject, and JsonVariant 2019-01-17 09:55:51 +01:00
Benoit Blanchon
e20c47c57b DynamicJsonDocument reallocates memory pool is it's too small 2018-12-07 10:38:58 +01:00
Benoit Blanchon
b77b203935 Extracted VariantData and CollectionData classes 2018-12-07 09:16:58 +01:00
Benoit Blanchon
aaf0d5c3c5 Renamed and moved internal files 2018-11-30 17:53:54 +01:00