mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-06-08 09:27:50 +02:00
parent
4d587638af
commit
a3a4059367
@ -1200,7 +1200,14 @@ Value Value::removeMember(const char* key)
|
|||||||
}
|
}
|
||||||
Value Value::removeMember(const JSONCPP_STRING& key)
|
Value Value::removeMember(const JSONCPP_STRING& key)
|
||||||
{
|
{
|
||||||
return removeMember(key.c_str());
|
JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == objectValue,
|
||||||
|
"in Json::Value::removeMember(): requires objectValue");
|
||||||
|
if (type_ == nullValue)
|
||||||
|
return nullSingleton();
|
||||||
|
|
||||||
|
Value removed; // null
|
||||||
|
removeMember(key.c_str(), key.c_str() + key.size(), &removed);
|
||||||
|
return removed; // still null if removeMember() did nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Value::removeIndex(ArrayIndex index, Value* removed) {
|
bool Value::removeIndex(ArrayIndex index, Value* removed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user