Skip to content

DEV: document JSONPath extensions - #3601

Closed
dwdougherty wants to merge 1 commit into
feature-oss-8.10from
DOC-6818
Closed

DEV: document JSONPath extensions#3601
dwdougherty wants to merge 1 commit into
feature-oss-8.10from
DOC-6818

Conversation

@dwdougherty

@dwdougherty dwdougherty commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

This is a Redis 8.10 feature. The primary page to review is this one:

https://redis.io/docs/staging/DOC-6818/develop/data-types/json/path-extensions/

There is a new example on each of the command pages. The other changes are just page sorting changes.


Note

Low Risk
Documentation-only changes with no runtime or API code; low risk aside from ensuring 8.10 behavior and breaking-change notes stay accurate.

Overview
Documents Redis Open Source 8.10 JSONPath extensions: a new JSONPath extensions guide (path-extensions.md) covering evaluation semantics, breaking changes (tilde in field names, reserved words), filter operators (!, literals, arithmetic, in/nin, set relations, size/empty, ~), functions (length, keys, aggregations, append, etc.), and projection expressions limited to JSON.GET, JSON.MGET, and JSON.RESP.

JSON.GET, JSON.MGET, and JSON.RESP each gain an open example section for projection paths with links to the new page. The core Path page points readers to extensions for 8.10+ capabilities. JSON develop section weights are bumped (use_cases 4→5 through developer 7→8) to slot the new page at weight 4.

Reviewed by Cursor Bugbot for commit d8ab0b1. Bugbot is set up for automated code reviews on this repo. Configure here.

@dwdougherty
dwdougherty requested review from a team and LiorKogan July 7, 2026 16:58
@dwdougherty dwdougherty self-assigned this Jul 7, 2026
@dwdougherty dwdougherty added dev oss Redis Open Source labels Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

DOC-6818

@dwdougherty

Copy link
Copy Markdown
Collaborator Author

Thank you, @cmilesb!

<details open>
<summary><b>Compute a value with a projection expression</b></summary>

Beginning with Redis Open Source 8.10, the path can be a projection expression that computes a value using arithmetic or a function, rather than only selecting a value from the document. For example:

@LiorKogan LiorKogan Jul 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is anything special about projections. It is just one of the JSONPath syntax extensions we introduced in 8.10.

There is also nothing special about JSON.GET, JSON.MGET, and JSON.RESP in that regard. You can use these extensions with any command that accepts a JSONPath.

I'd remove it from these e commands.

weight: 4
---

Beginning with Redis Open Source 8.10, the JSON data type extends its

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "Open Source"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can say that in Redis 8.10 we extended our JSONPath supported syntax with the following:

  • Projection expressions at the top level of a JSONPath query
  • == and != can now compare any literal, including array and object literals
  • Filter negation operator: !
  • size/sizeof and empty operators on string, array, object, and nodelist
  • in and nin operators: membership test on an array and nodelist
  • Operators on numbers: binary -, +, *, /, %, and unary - and +
  • Operator on object: ~
  • length() function on array, object, and string
  • Functions on number: abs(), ceiling(), floor()
  • Functions on string: match(), search()
  • Strings concatenation with concat()
  • Functions on array: first(), last(), index(), append()
  • Aggregation functions on array: min(), max(), avg(), sum(), stddev()
  • Function on object: keys()
  • Function on nodelist: count()
  • Function on nodelist with exactly one node: value()
  • Relations functions on array and nodelist: subsetof(), anyof(), noneof()

@@ -0,0 +1,423 @@
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a new document.
Instead, we should reflect these extensions in https://redis.io/docs/latest/develop/data-types/json/path/


Paths within the filter condition use the dot notation with either `@` to denote the current array element or the current object value, or `$` to denote the top-level element. For example, use `@.key_name` to refer to a nested value and `$.top_level_key_name` to refer to a top-level value.

Beginning with Redis Open Source 8.10, filter expressions and queries support additional operators, functions, and top-level projection expressions. For details, see [JSONPath extensions]({{< relref "develop/data-types/json/path-extensions" >}}).

@LiorKogan LiorKogan Jul 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include the extensions in this document rather than having a separate document.
We don't need to call them "extensions". We now support a richer syntax, more operators, and more functions.

@dwdougherty

Copy link
Copy Markdown
Collaborator Author

Closing this pull request, because @LiorKogan wants all the new syntax on the existing JSONPath page and says we don't need the JSON command changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants