PackageTrack
Sign in Get early access

softcreatr/jsonpath

JSONPath implementation for parsing, searching and flattening arrays

1.0.2 39M downloads/mo #690 most downloaded on Packagist SoftCreatR/JSONPath

What this package is like to depend on

Last release 7 months ago

23 Jan 2026

Ships fairly regularly

a new release about every 6 months

Most releases are documented

notes for 19 of 24 stable releases

Nothing withdrawn

no release was ever pulled

6 years old

24 releases · first in 2020

4 releases in the last 12 months

see the full history below

Release timeline

24 releases · Oct 2020 to Jan 2026
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 24
  1. 1.0.2 23 Jan 2026
    Release notes

    Fixed tokenizer handling for quoted bracket keys containing $ so literals like ['[$the.size$]'] remain atomic and do not split into root tokens.

    Full Changelog: 1.0.1...1.0.2

    Open source →
    Release notes
    • Fixed tokenizer handling for quoted bracket keys containing $ so literals like ['[$the.size$]'] remain atomic and do not split into root tokens.
    Open source →
  2. 1.0.1 15 Jan 2026
    Release notes
    • Aligned the query runner and lexer with the JSONPath comparison suite: JSON documents are now decoded as objects to preserve {} vs [], unsupported selectors no longer abort the runner, and dot-notation now accepts quoted keys with dots/spaces/leading @.
    • Hardened filter parsing: boolean-only filters (?(true|false|null)), literal short-circuiting (&& false, || true), and empty filters now return the expected collections instead of throwing.
    • Slice filters gracefully skip non-countable objects.

    Full Changelog: 1.0.0...1.0.1

    Open source →
    Release notes
    • Aligned the query runner and lexer with the JSONPath comparison suite: JSON documents are now decoded as objects to preserve {} vs [], unsupported selectors no longer abort the runner, and dot-notation now accepts quoted keys with dots/spaces/leading @.
    • Hardened filter parsing: boolean-only filters (?(true|false|null)), literal short-circuiting (&& false, || true), and empty filters now return the expected collections instead of throwing.
    • Slice filters gracefully skip non-countable objects.
    Open source →
  3. 1.0.0 18 Dec 2025
    Release notes

    Version 1.0.0 is finally here!

    • Rebuilt the test suite from scratch: removed bulky baseline fixtures and added compact unit/integration coverage for every filter (index, union, query, recursive, slice), lexer edge cases, and JSONPath core helpers. Runs reflection-free and deprecation-free.
    • Achieved and enforced 100% code coverage across AccessHelper, all filters, lexer, tokens, and JSONPath core while keeping phpstan and coding standards clean.
    • Added a lightweight manual query runner with curated examples to exercise selectors quickly without external datasets.
    • Major compatibility push toward the unofficial JSONPath standard: unions support slices/queries/wildcards, trailing commas parse correctly, negative indexes and bracket-escaped keys (quotes, brackets, wildcards, special chars) are honored, filters compare path-to-path and root references, equality/deep-equality/regex/in/nin semantics align with expectations, and null existence/value handling follows RFC behavior.
    • New feature highlights from this cycle:
      • Multi-key unions with and without quotes: $[name,year] and $["name","year"].
      • Robust bracket notation for special/escaped keys, including ']', '*', $, backslashes, and mixed punctuation.
      • Trailing comma support in unions/slices (e.g. $..books[0,1,2,]).
      • Negative index handling aligned with spec (short arrays return empty; -1 works where valid).
      • Filter improvements: path-to-path/root comparisons, deep equality across scalars/objects/arrays/null/empties, regex matching, in/nin/!in, tautological expressions, and ?@ existence behavior per RFC.
      • Unions combining slices/queries/wildcards now return complete results (e.g. $[1:3,4], $[*,1]).

    Full Changelog: 0.11.0...1.0.0

    Open source →
    Release notes
    • Rebuilt the test suite from scratch: removed bulky baseline fixtures and added compact unit/integration coverage for every filter (index, union, query, recursive, slice), lexer edge cases, and JSONPath core helpers. Runs reflection-free and deprecation-free.
    • Achieved and enforced 100% code coverage across AccessHelper, all filters, lexer, tokens, and JSONPath core while keeping phpstan and coding standards clean.
    • Added a lightweight manual query runner with curated examples to exercise selectors quickly without external datasets.
    • Major compatibility push toward the unofficial JSONPath standard: unions support slices/queries/wildcards, trailing commas parse correctly, negative indexes and bracket-escaped keys (quotes, brackets, wildcards, special chars) are honored, filters compare path-to-path and root references, equality/deep-equality/regex/in/nin semantics align with expectations, and null existence/value handling follows RFC behavior.
    • New feature highlights from this cycle:
      • Multi-key unions with and without quotes: $[name,year] and $["name","year"].
      • Robust bracket notation for special/escaped keys, including ']', '*', $, backslashes, and mixed punctuation.
      • Trailing comma support in unions/slices (e.g. $..books[0,1,2,]).
      • Negative index handling aligned with spec (short arrays return empty; -1 works where valid).
      • Filter improvements: path-to-path/root comparisons, deep equality across scalars/objects/arrays/null/empties, regex matching, in/nin/!in, tautological expressions, and ?@ existence behavior per RFC.
      • Unions combining slices/queries/wildcards now return complete results (e.g. $[1:3,4], $[*,1]).
    Open source →
  4. 0.11.0 17 Dec 2025
    Release notes

    🔻 Breaking changes ahead:

    • Dropped support for PHP < 8.5
    • JSONPathToken now uses a TokenType enum and the constructor signature changed accordingly.
    • JSONPath options flag is now an int bitmask (was bool), requiring callers to pass integer flags.
    • SliceFilter returns an empty result for non-positive step values (previously iterated indefinitely).
    • QueryResultFilter now throws a JSONPathException for unsupported operators instead of silently proceeding.
    • Access helper behavior is stricter: arrayValues throws on invalid types; ArrayAccess lookups check offsetExists before reading; traversables and objects are handled distinctly.
    • Adopted PHP 8.5 features: TokenType enum, readonly value object for tokens, typed flags/options, and #[\Override] usage.
    • CI now runs on PHP 8.5 with required extensions; code style workflow updated accordingly.
    • Added coverage for AccessHelper edge cases (magic getters, ArrayAccess, traversables, negative indexes), QueryResultFilter arithmetic branches, and SliceFilter negative/null bounds.
    • Fixed empty-expression handling in lexer and improved safety in AccessHelper traversable lookups.
    • Added PHPStan static analysis to the toolchain and addressed its findings.

    Full Changelog: 0.10.0...0.11.0

    Open source →
    Release notes

    🔻 Breaking changes ahead:

    • Dropped support for PHP < 8.5
    • JSONPathToken now uses a TokenType enum and the constructor signature changed accordingly.
    • JSONPath options flag is now an int bitmask (was bool), requiring callers to pass integer flags.
    • SliceFilter returns an empty result for non-positive step values (previously iterated indefinitely).
    • QueryResultFilter now throws a JSONPathException for unsupported operators instead of silently proceeding.
    • Access helper behavior is stricter: arrayValues throws on invalid types; ArrayAccess lookups check offsetExists before reading; traversables and objects are handled distinctly.
    • Adopted PHP 8.5 features: TokenType enum, readonly value object for tokens, typed flags/options, and #[\Override] usage.
    • CI now runs on PHP 8.5 with required extensions; code style workflow updated accordingly.
    • Added coverage for AccessHelper edge cases (magic getters, ArrayAccess, traversables, negative indexes), QueryResultFilter arithmetic branches, and SliceFilter negative/null bounds.
    • Fixed empty-expression handling in lexer and improved safety in AccessHelper traversable lookups.
    • Added PHPStan static analysis to the toolchain and addressed its findings.
    Open source →
  5. 0.10.0 22 Mar 2025
    Release notes

    What's Changed

    • Refactoring of QueryMatchFilter and provide greater support for JSONPath spec by @lucasnetau in #79

    New Contributors

    Full Changelog: 0.9.1...0.10.0

    Open source →
    Release notes
    • Fixed query/selector Filter Expression With Current Object
    • Fixed query/selector Filter Expression With Different Grouped Operators
    • Fixed query/selector Filter Expression With equals_on_array_of_numbers
    • Fixed query/selector Filter Expression With Negation and Equals
    • Fixed query/selector Filter Expression With Negation and Less Than
    • Fixed query/selector Filter Expression Without Value
    • Fixed query/selector Filter Expression With Boolean AND Operator (#42)
    • Fixed query/selector Filter Expression With Boolean OR Operator (#43)
    • Fixed query/selector Filter Expression With Equals (#45)
    • Fixed query/selector Filter Expression With Equals false (#46)
    • Fixed query/selector Filter Expression With Equals null (#47)
    • Fixed query/selector Filter Expression With Equals Number With Fraction (#48)
    • Fixed query/selector Filter Expression With Equals true (#50)
    • Fixed query/selector Filter Expression With Greater Than (#52)
    • Fixed query/selector Filter Expression With Greater Than or Equal (#53)
    • Fixed query/selector Filter Expression With Less Than (#54)
    • Fixed query/selector Filter Expression With Less Than or Equal (#55)
    • Fixed query/selector Filter Expression With Not Equals (#56)
    • Fixed query/selector Filter Expression With Value (#57)
    • Fixed query/selector script_expression (Expected test result corrected)
    • Added additional NULL related query tests from JSONPath RFC
    Open source →
  6. 0.9.1 01 Jun 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 0.9.0...0.9.1

    Open source →
  7. 0.9.0 13 Mar 2024
    Release notes

    Full Changelog: 0.8.3...0.9.0

    Open source →
    Release notes

    🔻 Breaking changes ahead:

    • Dropped support for PHP < 8.1
    Open source →
  8. 0.8.3 17 Aug 2023
    Release notes

    What's Changed

    • Change getData() so that it can be mixed instead of array by @rcjsuen in #77

    New Contributors

    Full Changelog: 0.8.2...0.8.3

    Open source →
    Release notes
    • Change getData() so that it can be mixed instead of array
    Open source →
  9. 0.8.2 12 Feb 2023
    Release notes

    What's Changed

    • Handle multi-level JSON with objects and arrays by @kapow in #76

    New Contributors

    • @kapow made their first contribution in #76

    Full Changelog: 0.8.1...0.8.2

    Open source →
    Release notes
    • AccessHelper & RecursiveFilter now return a plain object, rather than an ArrayAccess object
    Open source →
  10. 0.8.1 27 Sep 2022
    Release notes

    Full Changelog: 0.8.0...0.8.1

    Open source →
    Release notes
    • Removed strict_types
    • Applied some PSR-12 related changes
    • Small code optimizations
    Open source →
  11. 0.8.0 31 Jan 2022
    Release notes

    🔻 Breaking changes ahead:

    • Dropped support for PHP < 8.0
    • Removed deprecated method JSONPath->data()
    Open source →
  12. 0.7.6 27 Sep 2022

    Nothing published for this version

  13. 0.7.5 02 Jun 2021
    Release notes
    • Added support for $.length
    • Added trim to explode to support both 1,2,3 and 1, 2, 3 inputs
    • Dropped in_array strict equality check to be in line with the other standard equality checks such as (== and !=)
    Open source →
  14. 0.7.4 07 May 2021
    Release notes
    • Removed PHPUnit from conflicting packages
    Open source →
  15. 0.7.3 08 Mar 2021
    Release notes
    • Fixed PHP 7.4+ compatibility issues
    Open source →
  16. 0.7.2 27 Oct 2020
    Release notes
    • Fixed query/selector "Array Slice With Start Large Negative Number And Open End On Short Array" (#7)
    • Fixed query/selector "Union With Keys" (#22)
    • Fixed query/selector "Dot Notation After Union With Keys" (#15)
    • Fixed query/selector "Union With Keys After Array Slice" (#23)
    • Fixed query/selector "Union With Keys After Bracket Notation" (#24)
    • Fixed query/selector "Union With Keys On Object Without Key" (#25)
    Open source →
  17. 0.7.1 26 Oct 2020
    Release notes
    • Fixed issues with empty tokens ([''] and [""])
    • Fixed TypeError in AccessHelper::keyExists
    • Improved QueryTest
    Open source →
  18. 0.7.0 21 Oct 2020
    Release notes

    🔻 Breaking changes ahead:

    • Made JSONPath::__construct final
    • Added missing type hints
    • Partially reduced complexity
    • Performed some code optimizations
    • Updated composer.json for proper PHPUnit/PHP usage
    • Added support for regular expression operator (=~)
    • Added QueryTest to perform tests against all queries from https://cburgmer.github.io/json-path-comparison/
    • Switched Code Style from PSR-2 to PSR-12
    Open source →
  19. 0.6.4 18 Oct 2020
    Release notes
    • Removed unnecessary type casting, that caused problems under certain circumstances
    • Added support for nin operator
    • Added support for greater than or equal operator (>=)
    • Added support for less or equal operator (<=)
    Open source →
  20. 0.6.3 17 Oct 2020
    Release notes
    • Added support for in operator
    • Fixed evaluation on indexed object
    Open source →
  21. 0.6.2 14 Oct 2020

    Nothing published for this version

  22. 0.6.1 11 Oct 2020

    Nothing published for this version

  23. 0.6.0 11 Oct 2020

    Nothing published for this version

  24. 0.5.1 02 Nov 2020

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive