Commit Graph

32 Commits

Author SHA1 Message Date
Benoit Blanchon
dddc4912c4 Don't store string literals by pointer anymore
Fixes #2189
2025-08-28 10:04:11 +02:00
Benoit Blanchon
91397f9f06 Optimize storage of tiny strings (up to 3 characters) 2025-04-09 08:55:08 +02:00
Benoit Blanchon
67dd3120e6 Fix conversion from static string to number 2025-02-27 11:01:51 +01:00
Benoit Blanchon
01e49b33b7 Update copyright year 2025-02-24 15:18:26 +01:00
Benoit Blanchon
e33e78d202 Rename undocumented JsonString::isLinked() to isStatic() 2024-11-26 14:32:50 +01:00
Benoit Blanchon
1f7a3f3174 JsonDeserializer: use float when the value has few digits 2024-09-04 14:33:14 +02:00
Benoit Blanchon
3b6bf45b8a Serialize float with less decimal places than double 2024-09-03 11:44:35 +02:00
Benoit Blanchon
33452c1f37 Test JsonVariant::as<T>() with extension slots 2024-08-27 16:08:47 +02:00
Benoit Blanchon
45611924f3 Tests: add user-defined literal ""_s for std::string 2024-06-07 09:35:45 +02:00
Benoit Blanchon
e4f3fd8c91 Add support for MsgPack extension 2024-06-06 18:33:48 +02:00
Benoit Blanchon
5f5f927693 Add tests of as<MsgPackBinary>() 2024-05-01 19:26:19 +02:00
Benoit Blanchon
315cc722e9 Add more tests for JsonVariantConst 2024-01-08 19:47:40 +01:00
Benoit Blanchon
0e8a236583 Update copyright year 2024-01-03 08:47:06 +01:00
Benoit Blanchon
0f319e7ca4 Remove capacity from JsonDocument's constructor 2023-07-18 09:08:55 +02:00
Benoit Blanchon
540901e219 Merge DynamicJsonDocument with JsonDocument 2023-03-20 14:49:51 +01:00
Benoit Blanchon
daa87e12dc Update copyright notice 2023-02-16 11:45:01 +01:00
Benoit Blanchon
1b66a217bf Replace ARDUINOJSON_NAMESPACE with an inline namespace (#1820) 2023-02-14 10:04:48 +01: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
3d6c328a4f Add JsonVariant::link() (resolves #1343) 2022-04-27 15:08:13 +02:00
Benoit Blanchon
a880614a75 Fix call of overloaded 'String(const char*, int)' is ambiguous 2022-02-17 17:33:16 +01:00
Benoit Blanchon
af18994deb Update copyright notice 2022-01-01 10:01:05 +01:00
Benoit Blanchon
a7873389c6 Change VariantData::asString() return type to JsonString 2021-10-24 09:58:39 +02:00
Benoit Blanchon
df4a4b9e1d Add as<JsonString>() 2021-10-24 09:58:13 +02:00
Benoit Blanchon
ef7579394b Fixed JsonVariant::as<unsigned>() (fixes #1601) 2021-06-30 09:58:03 +02:00
Benoit Blanchon
fc4f5fd05f Changed integer storage from positive/negative to signed/unsigned 2021-04-14 11:45:01 +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
e4ce75e20c Simplified JsonVariant::as<T>() to always return T 2021-03-08 19:33:52 +01:00
Benoit Blanchon
97b7161d78 Update copyright notice for 2021 2021-01-25 09:14:15 +01:00
Benoit Blanchon
3bb0a7aa8e Added support for enums in as<T>() and is<T>() (fixes #1256) 2020-05-04 11:13:06 +02:00
Benoit Blanchon
f9cfea244a Updated copyright notice 2020-01-09 15:48:38 +01:00
Benoit Blanchon
00c391320c Added support for CMake's unity builds 2019-12-24 16:42:34 +01:00
Benoit Blanchon
b47ac27ac6 Moved ancillary files to extras/ (fixes #1011) 2019-09-03 15:11:05 +02:00