Commit Graph

34 Commits

Author SHA1 Message Date
Benoit Blanchon
c5838a876b Remove getElement(), getOrAddElement(), getMember(), and getOrAddMember() 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
3b3ab8c4e1 Inline variantAsArray() and variantAsObject() 2022-07-05 14:02:41 +02:00
Benoit Blanchon
5b06b1564e Remove undocumented accept() functions 2022-07-03 17:38:03 +02:00
Benoit Blanchon
ee74c3bb1c Inline variantAccept() 2022-05-23 19:17:18 +02:00
Benoit Blanchon
3d6c328a4f Add JsonVariant::link() (resolves #1343) 2022-04-27 15:08:13 +02:00
Benoit Blanchon
3760a643cb Implement comparison out of VariantData 2022-04-27 15:07:25 +02:00
Benoit Blanchon
fc9d8aa31e Implement nesting() out of VariantData 2022-04-07 21:11:31 +02:00
Benoit Blanchon
af18994deb Update copyright notice 2022-01-01 10:01:05 +01:00
Benoit Blanchon
90d750e4d9 Increase coverage 2021-12-07 16:08:44 +01:00
Benoit Blanchon
ca24ed48f5 Separate string adapter from storage policy 2021-12-07 16:08:44 +01:00
Benoit Blanchon
62f9b94ab1 Add CopiedString and LinkedString 2021-11-24 19:06:49 +01: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
3aab36fec2 Changed JsonVariantConst::is<JsonArray/JsonObject>() to return false (closes #1412) 2021-02-25 19:19:23 +01:00
Benoit Blanchon
97b7161d78 Update copyright notice for 2021 2021-01-25 09:14:15 +01:00
Benoit Blanchon
5ab53f42b2 Added a return value to visitors 2020-08-29 18:40:27 +02:00
Benoit Blanchon
4df29fbac1 Fixed "linked" strings incorrectly marked as "owned" (fixes #1318) 2020-07-24 22:25:56 +02:00
Benoit Blanchon
04c59985a1 Inverted dependency between MemoryPool and string adapters.
Inserted a null after each raw string in the pool.
2020-07-08 09:38:27 +02:00
Benoit Blanchon
7e58347fbe Added comparisons between JsonVariants 2020-07-02 15:28:34 +02:00
Benoit Blanchon
f7de027617 Break build if using 64-bit integers with ARDUINOJSON_USE_LONG_LONG==0 2020-05-14 10:25:10 +02:00
Benoit Blanchon
95f05dad66 Added JsonVariant as an input type for deserializeXxx() 2020-05-05 13:16:32 +02:00
Benoit Blanchon
d8724e0a0b Changed the array subscript to automatically add missing elements 2020-02-20 08:59:25 +01:00
Benoit Blanchon
0814fc185f Added a line-break after each "if" to get more accurate coverage report 2020-02-16 15:05:23 +01:00
Benoit Blanchon
f9cfea244a Updated copyright notice 2020-01-09 15:48:38 +01:00
Benoit Blanchon
fcbec6eb6d Use absolute instead of relative includes (fixes #1072) 2019-08-26 11:57:57 +02:00
Benoit Blanchon
576543c4b4 Added overflow handling in JsonVariant::as<T>() and JsonVariant::is<T>() 2019-03-06 15:31:37 +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
4167b11434 Create or assign a JsonDocument from a JsonArray/JsonObject/JsonVariant 2019-01-23 10:47:20 +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