Benoit Blanchon
2182c83b87
Remove ArrayShortcuts and ObjectShortcuts
2022-11-02 09:18:02 +01:00
Benoit Blanchon
7004c39af6
variantGetOrAddMember() takes an adapted string like all its siblings
2022-10-26 10:44:21 +02:00
Benoit Blanchon
b27990f780
Attach copy policy to string adapters
2022-10-26 10:37:18 +02:00
Benoit Blanchon
6e17c3e6f9
Extract VariantRefBase from VariantProxy
2022-10-03 19:14:05 +02:00
Benoit Blanchon
cf4436e581
Extract VariantProxy from ElementProxy and MemberProxy
2022-08-30 10:25:03 +02:00
Benoit Blanchon
2b6bb78a09
Don't call operator VariantConstRef in VariantComparer
2022-08-30 10:25:03 +02:00
Benoit Blanchon
8002722f3b
Clang-format: set DerivePointerAlignment to false
2022-08-09 16:52:17 +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
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
77b4270d97
Remove Visitable
2022-07-03 15:37:08 +02:00
Benoit Blanchon
ee74c3bb1c
Inline variantAccept()
2022-05-23 19:17:18 +02:00
Benoit Blanchon
37faa7ce13
Merge definitions of VariantConstRef::accept() and VariantRef::accept()
2022-05-23 19:11:09 +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
ac1d29fac0
Add meta function ConverterNeedsWriteableRef<T>
2022-04-27 15:07:26 +02:00
Benoit Blanchon
98037e5742
Move several functions from VariantImpl.hpp to VariantRef.hpp
2022-04-27 15:07:26 +02:00
Benoit Blanchon
d0e3808dd0
Move declaration of VariantConstRef above VariantRef
2022-04-27 15:07:25 +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
8d9504239b
Fix comparisons operators with const JsonDocument&
2022-04-05 10:12:17 +02:00
Benoit Blanchon
ff06292d74
Fix -Wsign-conversion -funsigned-char ( fixes #1715 )
2022-02-28 10:00:12 +01:00
Benoit Blanchon
a880614a75
Fix call of overloaded 'String(const char*, int)' is ambiguous
2022-02-17 17:33:16 +01:00
Benoit Blanchon
4f6244eef4
Replace CopiedString and LinkedString with JsonString
2022-01-13 16:15:53 +01:00
Benoit Blanchon
ee12155617
Fix crash when adding an object member in a too small JsonDocument
2022-01-13 11:52:45 +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
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
be70f6ddd7
Support NUL inside string values (issue #1646 )
2021-12-07 16:08:44 +01:00
Benoit Blanchon
43b2e2e774
Append terminator in saveStringFromFreeZone()
2021-11-24 19:06:49 +01:00
Benoit Blanchon
62f9b94ab1
Add CopiedString and LinkedString
2021-11-24 19:06:49 +01:00
Benoit Blanchon
599e927590
Fix JsonVariant::memoryUsage() for raw strings
2021-11-12 16:55:41 +01:00
Benoit Blanchon
0429016ff1
Remove IsWriteableString
2021-11-12 15:28:33 +01:00
Benoit Blanchon
a7873389c6
Change VariantData::asString() return type to JsonString
2021-10-24 09:58:39 +02:00
Benoit Blanchon
8418845c8d
Add is<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
e0cd5b6405
Increased test coverage
2021-09-12 10:13:12 +02:00
Benoit Blanchon
1b74ad0731
Fixed error 'dummy' may be used uninitialized on GCC 11
2021-08-03 11:39:07 +02:00
Benoit Blanchon
9d58e566fd
Added as<std::string_view>() and is<std::string_view>()
2021-07-27 14:16:39 +02:00
Benoit Blanchon
5790f3c8f7
Refactored string adapters: only one IsString<T> and adaptString()
2021-07-27 14:16:18 +02:00
Benoit Blanchon
4073b52c00
Changed return type of convertToJson() and Converter::toJson() to void
2021-07-23 15:11:48 +02:00
Benoit Blanchon
4e261068a1
clang-format: set IndentPPDirectives to AfterHash
2021-06-16 21:08:01 +02:00
Benoit Blanchon
1d24caf066
Added InvalidConversion to identify invalid conversions ( closes #1585 )
2021-06-11 11:54:52 +02:00
Benoit Blanchon
6b8e93e05e
clang-tidy: fixed "uninitialized field" in VariantData
2021-06-04 11:36:20 +02:00
Benoit Blanchon
af3bb131c8
Fixed error Pe070 "incomplete type is not allowed" on IAR ( fixes #1560 )
2021-05-19 15:07:59 +02:00
Benoit Blanchon
c7c0b729c1
Added a deprecation warning for is<char>() and is<char*>()
2021-05-05 15:43:02 +02:00