Merge branch 'development' into LTS_development
# Conflicts: # src/controller/controller_streams.cpp
This commit is contained in:
commit
4f1e653c44
4 changed files with 30 additions and 0 deletions
14
lib/json.cpp
14
lib/json.cpp
|
@ -1294,6 +1294,20 @@ void JSON::Value::removeMember(const std::map<std::string, Value*>::iterator & i
|
|||
objVal.erase(it);
|
||||
}
|
||||
|
||||
void JSON::Value::removeNullMembers(){
|
||||
bool again = true;
|
||||
while (again){
|
||||
again = false;
|
||||
jsonForEach(*this, m){
|
||||
if (m.key().size() && m->isNull()){
|
||||
removeMember(m.key());
|
||||
again = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// For object JSON::Value objects, returns true if the
|
||||
/// given name is a member. Returns false otherwise.
|
||||
bool JSON::Value::isMember(const std::string & name) const {
|
||||
|
|
|
@ -84,6 +84,7 @@ namespace JSON {
|
|||
void removeMember(const std::string & name);
|
||||
void removeMember(const std::deque<Value*>::iterator & it);
|
||||
void removeMember(const std::map<std::string, Value*>::iterator & it);
|
||||
void removeNullMembers();
|
||||
bool isMember(const std::string & name) const;
|
||||
bool isInt() const;
|
||||
bool isString() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue