Skip to content

v0.1.8

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Sep 01:38
· 15 commits to main since this release

Fixed — empty dictionaries round-trip

An empty q dictionary decoded to {} on Python and Node, but sending that {}
back failed with Not supported empty dictionary, so a value the library handed
out could not be passed back as a query argument.

{} now serializes as (`symbol$())!() — the symbol-keyed frame this
library already emits for every non-empty dictionary and the frame q itself
produces for an emptied symbol dictionary — and nested empty dictionaries
serialize the same way. The wire form is 99 11 0 <0 keys> 0 0 <0 values>, 13
bytes, matching the length pass exactly.

Decoding also accepts q's canonical empty literal ()!(), whose keys are an
empty general list rather than an empty symbol list. It used to fail with
Only support symbol keys dictionary or keyed table, got k type 0; it now
decodes to {} alongside (`symbol$())!() and typed-value forms such as
0#`a`b!1 2. A general list that holds any keys is still rejected with the
same error, and a dictionary frame truncated before its key type or its values
now reports a deserialization error instead of an internal parser panic.