Skip to content

docs(zql): document JSON path filters - #332

Closed
arv wants to merge 1 commit into
mainfrom
arv/docs-json-filters-1.12
Closed

arv wants to merge 1 commit into
mainfrom
arv/docs-json-filters-1.12

Conversation

@arv

@arv arv commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Do not merge before Zero 1.12 is released. JSON path filters are not in a released Zero version yet. Keep this a draft until then.

Re-lands #327, which merged too early and was reverted in #330. The change to contents/docs/zql.mdx is identical to #327.

Adds a JSON Filters section to the ZQL page, under Where. It covers:

  • Using json(column, ...path) inside a cmp() callback.
  • Path segments: a string reads an object key, a number reads an array index, and the two never cross over.
  • Path completion and value types for columns with a custom JSON type.
  • Type-strict comparisons, with a short table of examples.
  • Single-type IN / NOT IN lists.
  • Missing keys and JSON null, both found with IS / IS NOT.

Also regenerates assets/search-index.json. It will conflict in that file with the aggregates docs PR; whichever lands second needs the index regenerated.

@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
zero-docs Ready Ready Preview Nov 6, 2026 11:25am UTC

Request Review

@arv
arv marked this pull request as ready for review November 12, 2026 11:13
Copilot AI lite review requested due to automatic review settings November 12, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documentation must state the runtime’s upper bound of 2 ** 31 - 1 for numeric path segments to avoid promising inputs the API rejects.

1 open issue
What changed in this PR

Documents upcoming JSON path filtering support in ZQL and regenerates the search index for the new guidance.

Changes:

  • Adds JSON path filter syntax, traversal rules, type-strict comparisons, IN/NOT IN, and missing/null semantics to the ZQL guide.
  • Regenerates searchable ZQL page and section entries.
  • Keeps the documentation release-gated until Zero 1.12 ships the feature.
File Description
contents/​docs/​zql.mdx Adds a JSON Filters section under the ZQL Where documentation covering path traversal, typed comparisons, membership filters, and missing or null values.
assets/​search-index.json Regenerates searchable page content and section metadata for the new JSON filter documentation.

Review effort: Lite

Comment thread contents/docs/zql.mdx
cmp(json('metadata', 'tags', 0), 'bug')
```

Array indexes must be non-negative integers. A string never indexes an array and a number never reads an object key, so `json('metadata', 'tags', '0')` reads as a missing value (see [Missing Values](#missing-values)).
@arv

arv commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #335, which merged the same zql.mdx content along with the 1.12 release notes.

@arv arv closed this Nov 12, 2026

This branch was successfully deployed

1 active deployment
Preview — 38ff99f2 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants