The criteria to encode
Encoding options
Configuration options for encoding operations.
Optional Readonlybase?: IRIBase IRI for IRI internalisation (must be absolute and hierarchical).
Converts absolute IRIs to internal (root-relative) form.
If omitted, IRIs are internalised against the app namespace IRI (app:/#).
Optional Readonlyindent?: boolean | numberIndentation level for pretty-printing encoded output.
true, uses default indentationfalse or a number less than or equal to 0, disables indentationIf omitted, output is not indented.
The encoded criteria string with internalised IRIs
TypeError If base is not a hierarchical IRI
Encodes criteria as a URL-safe string.
Serialises a Criteria into an application/x-www-form-urlencoded string, recursively internalising absolute IRIs against the provided
base; see Criteria Serialisation for the wire format.The encoder always produces canonical form:
>=price=100)name="widget")nullremain unquoted (JSON literals)^price=1,^name=-2)@tagsuffix (for example,"text"@en)This ensures consistent, predictable output. The decoder accepts both canonical and shorthand forms (for example, postfix operators like
price>=100, unquoted strings likename=widget).The codec treats the
@tagsuffix as an opaque key and assigns it no semantic meaning. Consumers are responsible for interpreting the resulting Dictionary using schema-based information.