Skip to content

is it possible to check existence of a value deep in hierarchy? #584

Closed
@crusader-mike

Description

Smth like this:

json j = ...;
if (j.find("/this/that/then"_json_pointer) != j.end()) ...;

I can use j.value(ptr, def_value), but then I can't tell if node actually existed. I can use j.at(...) -- but I don't want to deal with exceptions.

Edit: j.value() approach doesn't seem to work either...

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions