Commit Graph

52 Commits

Author SHA1 Message Date
b0730f04f7 Rename VariantRef to JsonVariant 2022-12-19 14:41:53 +01:00
ef8ed28aec Rename VariantConstRef to JsonVariantConst 2022-12-19 14:41:43 +01:00
8002722f3b Clang-format: set DerivePointerAlignment to false 2022-08-09 16:52:17 +02:00
758580bfb6 Rename addElement() to add() 2022-07-07 14:32:43 +02:00
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
3d6c328a4f Add JsonVariant::link() (resolves #1343) 2022-04-27 15:08:13 +02:00
5577d18377 JsonVariant: add tests for size() 2022-04-27 15:08:13 +02:00
1d103a1528 MemberProxy: move tests for createNestedArray() and createNestedObject() 2022-04-27 15:07:26 +02:00
ac1d29fac0 Add meta function ConverterNeedsWriteableRef<T> 2022-04-27 15:07:26 +02:00
89ed54362b Fix -Wsign-conversion on GCC 8 (fixes #1715) 2022-02-25 10:28:42 +01:00
a880614a75 Fix call of overloaded 'String(const char*, int)' is ambiguous 2022-02-17 17:33:16 +01:00
af18994deb Update copyright notice 2022-01-01 10:01:05 +01:00
0f529a3587 Renamed undocumented function isUndefined() to isUnbound() 2021-12-16 14:55:26 +01:00
90d750e4d9 Increase coverage 2021-12-07 16:08:44 +01:00
599e927590 Fix JsonVariant::memoryUsage() for raw strings 2021-11-12 16:55:41 +01:00
a7873389c6 Change VariantData::asString() return type to JsonString 2021-10-24 09:58:39 +02:00
8418845c8d Add is<JsonString>() 2021-10-24 09:58:39 +02:00
df4a4b9e1d Add as<JsonString>() 2021-10-24 09:58:13 +02:00
e0cd5b6405 Increased test coverage 2021-09-12 10:13:12 +02:00
4073b52c00 Changed return type of convertToJson() and Converter::toJson() to void 2021-07-23 15:11:48 +02:00
ef7579394b Fixed JsonVariant::as<unsigned>() (fixes #1601) 2021-06-30 09:58:03 +02:00
14639f129e CMake: added empty line at end of each file 2021-06-26 11:29:15 +02:00
622e7dd287 Fixed support for volatile float and double (fixes #1557) 2021-05-19 15:01:51 +02:00
337864618c Reversed parameters of convertToJson() and convertFromJson()
Now the order matches copyArray(): source first, destination second.
2021-04-28 10:25:39 +02:00
7be0c2c650 CMake: added labels to tests 2021-04-25 11:38:19 +02:00
d8a1d1a120 Increased coverage of ConverterImpl.hpp 2021-04-18 17:23:51 +02:00
fc4f5fd05f Changed integer storage from positive/negative to signed/unsigned 2021-04-14 11:45:01 +02:00
d5d2209d09 Added "https://" prefix to all URLs so they are clickable in VS Code 2021-03-29 19:35:25 +02:00
d7f5b56ca4 Added support for custom converters (closes #687) 2021-03-20 14:52:47 +01:00
e4ce75e20c Simplified JsonVariant::as<T>() to always return T 2021-03-08 19:33:52 +01:00
3aab36fec2 Changed JsonVariantConst::is<JsonArray/JsonObject>() to return false (closes #1412) 2021-02-25 19:19:23 +01:00
744d61f6fd Added JsonVariant::is<JsonVariant/JsonVariantConst>() (issue #1412) 2021-02-23 08:41:24 +01:00
05498aa178 Added JsonVariant::is<JsonVariant>() (issue #1412) 2021-02-23 08:39:58 +01:00
b1eb273d5b Added JsonVariant::is<JsonArrayConst/JsonObjectConst>() (issue #1412) 2021-02-23 08:33:28 +01:00
8a3f8510d6 Simplified tests of JsonVariant::is<T>() 2021-02-23 08:27:48 +01:00
5234c8124b Removed JsonVariant::as<char>() (fixes #1498) 2021-02-18 08:48:10 +01:00
97b7161d78 Update copyright notice for 2021 2021-01-25 09:14:15 +01:00
30da920135 Fixed invalid conversion in operator|(Variant, char*) (fixes #1432) 2020-11-09 09:21:19 +01:00
726f8be341 Added operator|(JsonVariantConst, JsonVariantConst) 2020-09-26 14:48:17 +02:00
d04669d0cc Fixed result of JsonVariant::set((char*)0) (fixes #1368) 2020-09-05 17:33:47 +02:00
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
7e58347fbe Added comparisons between JsonVariants 2020-07-02 15:28:34 +02:00
3bb0a7aa8e Added support for enums in as<T>() and is<T>() (fixes #1256) 2020-05-04 11:13:06 +02:00
dcf7eeef28 CMake: used link_libraries() instead of target_link_libraries() 2020-05-03 10:25:38 +02:00
1791dccbf2 Added CMake "install" target (closes #1209) 2020-04-07 21:43:10 +02:00
2996503b27 Fixed enums serialized as booleans (fixes #1197) 2020-02-26 16:16:20 +01:00
d8724e0a0b Changed the array subscript to automatically add missing elements 2020-02-20 08:59:25 +01:00
e6ddfc7afb Fixed static JsonString not being saved by reference 2020-02-16 17:34:04 +01:00
94b1c75fd2 Added getElement() and getMember() to JsonVariantConst 2020-01-27 12:35:32 +01:00
f9cfea244a Updated copyright notice 2020-01-09 15:48:38 +01:00