-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Current Situation
Currently, when using the JMES search package in PHP, if the provided expression does not match any elements inside the array, the result is returned as null.
Problem
As a developer, this poses an issue because receiving a null value does not provide sufficient information to determine whether the null value is due to the absence of the expression in the data or if the corresponding value in the array is intentionally null.
Desired Situation
It would be beneficial to have a boolean strict option available in the JMES search package. This option would allow developers to indicate that if an expression does not exist in the current data, an exception should be thrown instead of returning a null value. By receiving an exception, developers can easily identify the source of the issue and distinguish between the absence of the expression and intentionally null values in the array.
Expected Benefits
- Improved Error Handling: The exception will provide clear information about the source of the issue, allowing for easier debugging and error resolution.
- Accurate Null Value Detection: Developers can differentiate between the absence of an expression and intentional null values in the array, enabling better decision-making based on the search results.
Implementing this boolean strict option will enhance the usability and reliability of the JMES search package in PHP for developers, providing a more informative and predictable search experience.