The selection 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 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 selection string with internalised IRIs
TypeError If base is not a hierarchical IRI
Encodes a selection as a URL-safe string.
Serialises a Selection into an
application/x-www-form-urlencodedstring, recursively internalising absolute IRIs against the providedbase; see Selection 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.