galbar/jsonpath
JSONPath implementation for querying and updating JSON objects
1.3.1
7.5M downloads/mo
#1500 most downloaded on Packagist
Galbar/JsonPath-PHP
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 3 weeks to 2.7 years
Most releases are documented
notes for 12 of 16 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
16 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
16 releases · Sep 2015 to Mar 2023Releases
latest 16-
1.3.119 Aug 2021 -
0.7.302 Dec 2016Release notes
Open source →Merge pull request #4 from Skyscanner/length_re_wrong
Bug fix in `.length` regex. Minor code cleanup.
-
0.7.228 Nov 2016Release notes
Open source →- Documentation now properly defines what a variable name is.
- Dependencies are now properly defined for older PHP versions.
-
0.7.120 Oct 2015Release notes
Open source →- Bug fix when accessing an array with a negative index. It now behaves as expected.
-
0.7.021 Sep 2015Nothing published for this version
-
0.6.017 Sep 2015Nothing published for this version
-
0.5.116 Sep 2015Nothing published for this version
-
0.5.016 Sep 2015Nothing published for this version
-
3.005 Mar 2023Release notes
Open source →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, wherefalsewill 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
Release notes
Open source →Breaking changes:
- The recursive operation now works slightly different (see https://github.com/Galbar/JsonPath-PHP/commit/5ac1783ed447063357f472a080d56dbdfe5b4ee8)
- 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, wherefalsewill still be returned.
New features:
- Support for child selector operation immediatly after recursive operation:
$..[?(@.author == "Nigel Rees")] - In|Not In Array Operation (https://github.com/Galbar/JsonPath-PHP/pull/65 by @lucasangi)
- Added formal support for variable names starting with numbers in the dot-notation:
$.2
-
2.118 Aug 2022Release notes
Open source →- Allow filter keys with a regex match (https://github.com/Galbar/JsonPath-PHP/pull/59)
- Allow PCRE
iandxmodifiers in regex expressions (https://github.com/Galbar/JsonPath-PHP/pull/59) - Fix bug causing a DivisionByZeroError when using negative indexes to access an empty array (https://github.com/Galbar/JsonPath-PHP/issues/60)
-
2.019 Aug 2021Release notes
Open source →Until now (except for version
1.3, sorry, you should go to1.3.1if this affects you).lengthoperator always behaved in thesmartGetmanner.Starting with this version,
.lengthwill behave as any other operator. That is, it will always return an array of results, even if there is just one, unlesssmartGetis enabled, then it'll work in the same waysmartGetworks 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.Release notes
Open source →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.326 Jul 2021Release notes
Open source →- Expose internal language parsing and querying functions as part of the public API
Release notes
Open source →- Expose internal language parsing and querying functions as part of the public API
-
1.207 Apr 2021Release notes
Open source →- Add
!as synonym ofnot - Add
&&as synonym ofand - Add
||as synonym ofor
Release notes
Open source →- Add
!as synonym ofnot - Add
&&as synonym ofand - Add
||as synonym ofor
- Add
-
1.101 Jun 2020Release notes
Open source →- Drop support for PHP 5.4 and 5.5
- Add support for PHP 7.2 and 7.3
- Add utf-8 support (#33)
- Ability to use .length outside of [] (#28)
-
1.013 Sep 2017 -
0.807 Aug 2017