mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Added JsonDocument::remove() and JsonVariant::remove()
This commit is contained in:
@@ -169,6 +169,15 @@ class VariantData {
|
||||
return type() == VALUE_IS_NULL;
|
||||
}
|
||||
|
||||
void remove(size_t index) {
|
||||
if (isArray()) _content.asCollection.remove(index);
|
||||
}
|
||||
|
||||
template <typename TAdaptedString>
|
||||
void remove(TAdaptedString key) {
|
||||
if (isObject()) _content.asCollection.remove(key);
|
||||
}
|
||||
|
||||
void setBoolean(bool value) {
|
||||
setType(VALUE_IS_BOOLEAN);
|
||||
_content.asInteger = static_cast<UInt>(value);
|
||||
|
||||
Reference in New Issue
Block a user