This is the cl-jsonpath Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 11:52:18 2026 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-jsonpathJSONPath implementation for Common Lisp with 99% test coverage and complete RFC 9535 compliance. Supports cl-json, jonathan, and jzon backends with advanced features including arithmetic expressions, recursive descent, and bracket notation in filters.
Gabor Poczkodi
(GIT https://git.sr.ht/~hajovonta/cl-jsonpath)
MIT
1.0.0
cl-ppcre (system).
parse-number (system).
package.lisp (file).
cl-jsonpath.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-jsonpath/cl-jsonpath.lisppackage.lisp (file).
cl-jsonpath (system).
*default-backend* (special variable).
detect-backend (function).
extract (function).
extract-one (function).
*json-null* (special variable).
*jsonpath-token-patterns* (special variable).
advance-token (function).
apply-filter-function (function).
apply-function (function).
compare-values (function).
copy-jsonpath-expression (function).
copy-jsonpath-token (function).
current-token (function).
evaluate-arithmetic-expression (function).
evaluate-comparison (function).
evaluate-comparison-filter (function).
evaluate-count-value-function (function).
evaluate-dynamic-path (function).
evaluate-expression (generic function).
evaluate-filter-expression (function).
evaluate-filter-tokens (function).
evaluate-function-filter (function).
evaluate-in-filter (function).
evaluate-jsonpath (function).
evaluate-logical-filter (function).
evaluate-match-search-function (function).
evaluate-regex-filter (function).
evaluate-script-expression (function).
expect-token (function).
get-nested-value (function).
get-nested-value-with-found (function).
get-value (function).
get-value-with-found (function).
get-xml-children (function).
jsonpath-expression (structure).
jsonpath-expression-arguments (reader).
(setf jsonpath-expression-arguments) (writer).
jsonpath-expression-operation (reader).
(setf jsonpath-expression-operation) (writer).
jsonpath-expression-p (function).
jsonpath-expression-target (reader).
(setf jsonpath-expression-target) (writer).
jsonpath-expression-type (reader).
(setf jsonpath-expression-type) (writer).
jsonpath-token (structure).
jsonpath-token-p (function).
jsonpath-token-position (reader).
(setf jsonpath-token-position) (writer).
jsonpath-token-type (reader).
(setf jsonpath-token-type) (writer).
jsonpath-token-value (reader).
(setf jsonpath-token-value) (writer).
make-jsonpath-expression (function).
make-jsonpath-token (function).
normalize-jzon-null (function).
parse-arithmetic-expression (function).
parse-arithmetic-factor (function).
parse-arithmetic-term (function).
parse-array-literal (function).
parse-at-reference (function).
parse-bracket-expression (function).
parse-filter-expression (function).
parse-filter-value (function).
parse-float (function).
parse-jsonpath (function).
parse-jsonpath-expression (function).
parse-jsonpath-tokens (function).
parse-multi-field-expression (function).
parse-number (function).
parse-regex (function).
parse-script-expression (function).
parse-segments (function).
parse-slice-expression (function).
parse-string-literal (function).
parse-union-expression (function).
parse-union-indices (function).
recursive-array-search (function).
recursive-field-search (function).
recursive-filter-search (function).
recursive-indices-search (function).
recursive-wildcard-all (function).
tokenize-jsonpath (function).
xml-parse-value (function).
xml-text-content (function).
Packages are listed by definition order.
cl-jsonpathcommon-lisp.
*default-backend* (special variable).
detect-backend (function).
extract (function).
extract-one (function).
*json-null* (special variable).
*jsonpath-token-patterns* (special variable).
advance-token (function).
apply-filter-function (function).
apply-function (function).
compare-values (function).
copy-jsonpath-expression (function).
copy-jsonpath-token (function).
current-token (function).
evaluate-arithmetic-expression (function).
evaluate-comparison (function).
evaluate-comparison-filter (function).
evaluate-count-value-function (function).
evaluate-dynamic-path (function).
evaluate-expression (generic function).
evaluate-filter-expression (function).
evaluate-filter-tokens (function).
evaluate-function-filter (function).
evaluate-in-filter (function).
evaluate-jsonpath (function).
evaluate-logical-filter (function).
evaluate-match-search-function (function).
evaluate-regex-filter (function).
evaluate-script-expression (function).
expect-token (function).
get-nested-value (function).
get-nested-value-with-found (function).
get-value (function).
get-value-with-found (function).
get-xml-children (function).
jsonpath-expression (structure).
jsonpath-expression-arguments (reader).
(setf jsonpath-expression-arguments) (writer).
jsonpath-expression-operation (reader).
(setf jsonpath-expression-operation) (writer).
jsonpath-expression-p (function).
jsonpath-expression-target (reader).
(setf jsonpath-expression-target) (writer).
jsonpath-expression-type (reader).
(setf jsonpath-expression-type) (writer).
jsonpath-token (structure).
jsonpath-token-p (function).
jsonpath-token-position (reader).
(setf jsonpath-token-position) (writer).
jsonpath-token-type (reader).
(setf jsonpath-token-type) (writer).
jsonpath-token-value (reader).
(setf jsonpath-token-value) (writer).
make-jsonpath-expression (function).
make-jsonpath-token (function).
normalize-jzon-null (function).
parse-arithmetic-expression (function).
parse-arithmetic-factor (function).
parse-arithmetic-term (function).
parse-array-literal (function).
parse-at-reference (function).
parse-bracket-expression (function).
parse-filter-expression (function).
parse-filter-value (function).
parse-float (function).
parse-jsonpath (function).
parse-jsonpath-expression (function).
parse-jsonpath-tokens (function).
parse-multi-field-expression (function).
parse-number (function).
parse-regex (function).
parse-script-expression (function).
parse-segments (function).
parse-slice-expression (function).
parse-string-literal (function).
parse-union-expression (function).
parse-union-indices (function).
recursive-array-search (function).
recursive-field-search (function).
recursive-filter-search (function).
recursive-indices-search (function).
recursive-wildcard-all (function).
tokenize-jsonpath (function).
xml-parse-value (function).
xml-text-content (function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Default backend for JSON processing. :auto, :cl-json, or :jonathan
Auto-detect JSON/XML backend based on data structure
Extract data using JSONPath string - new architecture
Extract single item using JSONPath string - new architecture
Special marker to distinguish JSON null from Lisp NIL
Token patterns for JSONPath lexical analysis
Advance to next token
Apply filter function to value
Apply JSONPath function to target data list
Compare two values using operator.
RFC 9535: null is a valid value that can be compared.
Handles different backend representations: NIL (CL-JSON/Jonathan) and NULL symbol (JZON)
Get current token from parser state
Evaluate arithmetic expression like @.price + 5 or @.info.price * 2
Simple comparison function for filter expressions
Evaluate comparison filter expression with arithmetic support
Evaluate count(@.*.author) or value(@.price) - returns count or single value
Evaluate a dynamic path expression like @.book[0].category to get a field name
Evaluate filter expression against an item - handles both wrapped and unwrapped tokens
Core filter evaluation logic
Evaluate function filter: @.field.length() > 5 or match(@.field, ’pattern’) or count(@.*.author) >= 1
Evaluate in filter expression: @.field in [value1, value2]
Evaluate JSONPath AST against data
Evaluate logical filter expression with && or ||, handling parentheses
Evaluate match(), search(), count(), or value() function
Evaluate regex filter expression: @.field =~ /pattern/ or @.field !~ /pattern/
Evaluate script expression and return numeric result
Expect specific token type, advance if found
Get value from nested path like @.info.price.
path-tokens should be alternating :dot and :identifier tokens.
Returns the final value.
Get value from nested path and return (values value found-p). Returns T for found-p only if all intermediate fields exist.
Get value from object using appropriate backend format
Get value from object and return (values value found-p).
This distinguishes between ’field exists with null value’ and ’field missing’.
Get all children of xml-node with the given tag-name. Returns a list of matching child elements.
type.
type.
Normalize JZON’s NULL symbol to NIL for consistency across backends. JZON backend is normalized to :hash-table, so check for both.
Parse arithmetic expressions with +, -, *, /
Parse arithmetic factors: numbers, @.field, $.path, or parenthesized expressions
Parse arithmetic terms with *, /
Parse array literal [value1, value2, ...] from tokens
Parse @.field or @.field.function() references
Parse content inside brackets [...]
Parse filter expression inside [?(...)] with proper parentheses handling
Parse filter value from token
Parse float from string
Parse JSONPath string into Abstract Syntax Tree
Parse complete JSONPath expression
Parse tokens into JSONPath AST
Parse multi-field expression: [’field1’,’field2’]
Parse number from string
Parse regex string /pattern/flags to pattern and flags
Parse script expressions like (@.length-1) or (2+1)
Parse JSONPath segments recursively
Parse slice expression after colon: start:end or start:end:step
Parse string literal, removing quotes and handling escapes
Parse union expression: [0,2,5]
Parse union of indices: 0,1,2
Recursively search for all values at any level (RFC 9535: $..[*] returns all descendants)
Recursively search for field at any level in data structure
Recursively search for objects matching filter at any level
Recursively search for elements at specific indices at any depth
Recursively get ALL values at any depth (RFC 9535: $..* returns all values)
Tokenize JSONPath string into structured tokens
Parse XML string value to appropriate Lisp type. Converts numbers, booleans, and keeps strings as-is.
Extract text content from an XML node.
For simple elements like ("title" nil "Book 1"), returns "Book 1".
For elements with multiple text nodes, concatenates them.
Evaluate JSONPath expression against data
jsonpath-expression) data backend) ¶Evaluate JSONPath expression
| Jump to: | (
A C D E F G J M N P R T X |
|---|
| Jump to: | (
A C D E F G J M N P R T X |
|---|
| Jump to: | *
A O P S T V |
|---|
| Jump to: | *
A O P S T V |
|---|
| Jump to: | C F J P S |
|---|
| Jump to: | C F J P S |
|---|