Releases: Galbar/JsonPath-PHP
Releases · Galbar/JsonPath-PHP
3.0
Breaking changes:
- The recursive operation now works slightly different (see 5ac1783)
- Queries with no matches will now return empty arrays, instead of
false
. The only exception being when using smart get and a non-divergent path, wherefalse
will still be returned.
New features:
- Support for child selector operation immediatly after recursive operation:
$..[?(@.author == "Nigel Rees")]
- In|Not In Array Operation (#65 by @lucasangi)
- Added formal support for variable names starting with numbers in the dot-notation:
$.2
2.1
2.0: Normalize behavior of .length operation
Until now (except for version 1.3
, sorry, you should go to 1.3.1
if this affects you) .length
operator always behaved in the smartGet
manner.
Starting with this version, .length
will behave as any other operator. That is, it will always return an array of results, even if there is just one, unless smartGet
is enabled, then it'll work in the same way smartGet
works for every other operation: return the result directly, if the path does not diverge, or return an array of results, if the path diverges.
Also, fix regex so that array interval selector of the type [:3]
work.
1.3.1: Revert .length behavior to avoid breaking changes
- revert .length behavior to avoid breaking changes in same major version
1.3
1.2: add `!`, `&&` and `||` to be synonyms of `not`, `and` and `or`
- Add
!
as synonym ofnot
- Add
&&
as synonym ofand
- Add
||
as synonym ofor
1.1: Ability to use .length outside of []
1.0: Drop support for PHP 5.3
- Drop support for PHP 5.3
- Adding json_encode options bitmask (#7)
0.8: Allows minus character within property name
Fix typo in changelog
0.7.3: Bug fix in `.length` regex
Merge pull request #4 from Skyscanner/length_re_wrong Bug fix in `.length` regex. Minor code cleanup.