-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The implementation of Field supports only associative arrays: https://github.com/jmespath-community/php-jmespath/blob/master/src/node/Field.php#L24
Has it been considered to support stdClass or ArrayAccess? Both are supported by the implementation of mtdowling: https://github.com/jmespath/jmespath.php/blob/master/src/TreeInterpreter.php#L48-L52
When working with JSON it's more reliable to decode it as stdClass instead of an associative array. Associative arrays can cast properties to integers and there is no difference between an empty object and an empty array.
Implementing ArrayAccess is useful to retrieve values with JMESPath from objects that contain data without having to convert them to arrays.
Metadata
Metadata
Assignees
Labels
No labels