Added JsonDocument::remove() and JsonVariant::remove()

This commit is contained in:
Benoit Blanchon
2019-02-25 13:21:10 +01:00
parent bc2ce178ea
commit c9d6bd76c9
14 changed files with 298 additions and 2 deletions

View File

@@ -124,6 +124,25 @@ class ElementProxy : public VariantOperators<ElementProxy<TArray> >,
return getUpstreamElement().getElement(index);
}
FORCE_INLINE void remove(size_t index) const {
getUpstreamElement().remove(index);
}
// remove(char*) const
// remove(const char*) const
// remove(const __FlashStringHelper*) const
template <typename TChar>
FORCE_INLINE typename enable_if<IsString<TChar*>::value>::type remove(
TChar* key) const {
getUpstreamElement().remove(key);
}
// remove(const std::string&) const
// remove(const String&) const
template <typename TString>
FORCE_INLINE typename enable_if<IsString<TString>::value>::type remove(
const TString& key) const {
getUpstreamElement().remove(key);
}
private:
FORCE_INLINE VariantRef getUpstreamElement() const {
return _array.getElement(_index);