nahid / jsonq

A PHP query builder for JSON
Creative Commons Zero v1.0 Universal
870 stars 105 forks source link

Added ValueNotFound object #34

Closed tobias-kuendig closed 6 years ago

tobias-kuendig commented 6 years ago

If a value is queried it is possible that the value is null, '' or false. These are all valid return values that the user might want to know about.

With the current default return value of false in the getFromNested method, a custom macro might be called with false as a value (but in this case the value does not exist). Empty strings on the other hand are never passed to the macro but the user might care about these.

To distinct these falsey values from a value that was effectifely not found, the ValueNotFound object was introduced in this commit.

GitHubHubus commented 6 years ago

👍

nahid commented 6 years ago

Awesome!

nahid commented 6 years ago

this commit are available in version v5.2.2