Home JsonPath.Net



  • Improved parsing to account for a few missed scenarios involving math operations.
  • Greatly improved .ToString() to render a re-parsable path.


JSON Path Test Suite #83 - Fixes some order of operations issues with parsing filter expressions with boolean operators.


#738 - Adds additional support for AOT and trimming. Thanks to @jevansaks for implementing this update.


An update to the test suite revealed an issue with the filter expression parser.


#728 - Failure to parse escaped single quote in single-quoted string in filter expressions. Thanks to @ashek-simeon for reporting this.


Test Suite PR #77 added some tests to check for a dot . inside square brackets, where it should be considered a literal and not transformed.


Fixes a rare issue with match() and search() functions.


#711 - Nuget package meta-data updates; no functional changes from previous version.


Fixed an issue around operator precedence in boolean expressions.


JSON Path RFC 9535 has been released! (No functional changes from 0.8.0.)


#653 - @Emcrank applied modifications to support .Net Standard 2.0.


Updated for multi-framework support with .Net Standard 2.0 and .Net 8 with Native AOT support, including updating System.Text.Json from v6 to v8.

Breaking changes

  • Dropping support for .Net Standard 3.1 - May still be used, but exact behavior cannot be guaranteed.
  • JsonNodeExtensions.TryGetSingleValue(this JsonNode?) and .TryGetSingleValue(this NodeList?) updated to the bool Try...(out ...) pattern.


JsonPath.TypeInfoResolver to expose all of the type resolvers contained in the library. Can be used to create a combined SerializationOptions by using a Json.More.TypeResolverOptionsManager in your JsonSerializerContext.


#583 - Updated NodeList to implement IEnumerable<T> instead of IReadOnlyList<T>, which enables follow-on Linq queries, making the entire JSON Path evaluation a deferred execution query. Thanks to @qt-kaneko for explaining a use case that led to this change.

Technically this is a breaking change. The .Count property and indexer defined by IReadOnlyList<T> were left implemented on NodeList, so this shouldn’t impact consuming code, but there is a possibility.

It’s also important to note that .Count is now backed by Linq’s .Count() method, and the indexer is backed by Linq’s .ElementAt() method, so calling these isn’t zero-cost, like they once were. They will now invoke an evaluation of the path.


Whitespace between multiple selectors inside brackets was supported for .Parse() but not .TryParse(). Thanks to @Andrej-Peplinski for reporting this.


Adds support for + in number literals, e.g. +24 and 1e+5.


Update .AsJsonPointer() to allow $[1,"1"] pattern discussed in https://blog.json-everything.net/posts/paths-and-pointers-correction/.


#495 - .TryParse() with empty string throws exception. Thanks to @ben-wckdrzr for reporting this.


Test Suite #41 - ANBF allows for whitespace between segments.


#465 - Exposes more of the JSON Path object model, while making the exposed API more consistent.


#463 - Fixed implementation for string comparisons in filter expressions. Thanks to @idefy for reporting this.


Updated support for whitespace in all the right places.

Changed PathParsingOptions.TolerateSurroundingWhitespace to TolerateExtraWhitespace which now enables support for whitespace pretty much everywhere.


Improved support for regular expressions matching unicode text.


Added optional support for:

  • allowing leading and trailing whitespace
  • in operator in expressions
  • JSON constructs as literals in expressions
  • relative paths (starting a path with @)


Updated to meet the requirements in draft 11.

  • Update function definition
    • only name is required by the interface
    • functions must now inherit from ValueFunctionDefinition, LogicalFunctionDefinition, or NodeListFunctionDefinition
    • Evaluate() is now detected via reflection at registration time
      • return type must conform to the base class
      • any count of parameters are supported, but they must be of type JsonNode, bool, or NodeList
      • only one evaluation method per function class
  • Added value() function
  • Moved parsing of math operators behind PathParsingOptions.AllowMathOperations, which defaults to false
  • FunctionType now matches the type system in the spec
  • ParameterType removed and usages replaced with FunctionType
  • NodeList implicit casts removed as they are no longer defined by the spec
  • Fixed a parsing issue that allowed non-singular paths in filter expressions


  • Updated function definition
    • list parameter sets to support type checking and overloads rather than a minimum and maximum parameter count
    • add return type to support type checking within expressions
  • fixes around TryParse() to ensure that it doesn’t throw exceptions (at least not from this code)
  • more fixes based on expanded tests in the compliance test suite


I added a bunch of tests to the JSON Path test suite and found a few bugs in filter expressions. This release fixes those bugs.

  • Some copy/paste/forgot-to-edit issues with </<=/>/>=
  • Not extracting string values correctly in comparisons
  • Not treating null values correctly when evaluating local paths (e.g. @.a)


#364 - count(), match(), and search() functions are not registered and so cannot be parsed. Thanks to @amis92 for finding and reporting this.


Fixed an issue in search and match function evaluation.


#281 - Complete rewrite to support JsonNode and align with specification. #351 - Fixes issues parsing $.['foo'] (basically removes support since the .[] syntax is invalid).

Changes of note:

  • Expression functions are supported and custom functions can be created.
  • .length has been replaced by length() function.
  • Available functions:
    • length() - Length of values (objects, arrays, & strings)
    • count() - Length of nodelists
    • match() - Precise regex matching (uses implicit anchoring)
    • search() - General regex matching (does not use implicit anchoring, more like JSON Schema’s pattern keyword)
  • Expression engine is more robust.
  • No context object needed for evaluation.
  • Removed experimental feature of $ref resolution since it’s not in the spec. (See the JSON Referencing proposals from the JSON Schema group at https://github.com/json-schema-org/referencing)


#243 - Updated System.Text.Json to version 6.

Fixed issue with parsing recursive descents into quoted-index property names, e.g. $..['foo']. Previous versions added two recursive descent selectors, which resulted in duplicate entries in the results.


Result locations should be expressed in Normalized Paths, not JSON Pointers.


Updated JsonPointer.Net to v2.0.0. Please see release notes for that library as it contains breaking changes.


Added experimential support for referencing data in secondary documents.


Added support for unary-not operator, e.g.


  • Parenthetical support for nested expressions.
  • Better stringifying.


Added support for comparisons against all JSON literals in expressions.


Better error reporting during parsing.


#151 - Parsing expressions with numeric values that contain 9 fails.


#132 - Fixed some memory management issues around JsonDocument and JsonElement. Thanks to @ddunkin for finding and fixing these.


Updated expression parsing to handle whitespace better.


Added support for nullable reference types.


Signed the DLL for strong name compatibility.

0.1.3 (no PR)

Fixed issue with parsing property path segments that end in z, Z, and 9 (e.g. $.baz).


Added debug symbols to package. No functional change.


Better single-quote support.


Initial release.