Skip to content

v4.2.6

Choose a tag to compare

@github-actions github-actions released this 03 Mar 12:09
· 6 commits to main since this release

Release v4.2.6

This release add JSON::contains(const std::vector<std::string>& path) const function
which can be used if traversable path exists or not;

for example, if json content is following:

{
  "obj": {
    "another_obj": {
       "value": "result"
    }
  }
}

function can be used like this json.contains({ "obj", "another_obj", "value" }); to determine
if value exists inside obj -> another_obj, saving user from a lot, for example:
if ( j.contains["obj"] && j["obj"].contains("another_obj"] && j["obj"]["another_obj"].contains("value")) ...

Signed-off-by: Oskari Rauta oskari.rauta@gmail.com