Skip to content

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

Description

@crusader-mike

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...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions