Querystring drops explicit empty-string scalar values

Author: sylvesterkaczmarekCreated Sep 10, 2026Updated Sep 10, 2026
Labelsv4

Querystring.stringify() drops an explicit empty-string scalar because _stringify_item() checks the serialized value with a truthiness test.

python
stringify({"filter": ""}) == ""  # current behavior

This conflates an explicit empty value with None. In a URL query, filter= is distinct from omitting filter entirely. The behavior is also inconsistent across array formats, where an empty string can be retained by comma serialization.

Expected behavior: continue omitting None, but serialize an explicit empty string as filter=.