25 chars · 1 line
43 chars · 3 lines
25 chars · 1 line
43 chars · 3 lines
Query array serialization
Build Query creates one parameter per array item. An empty array contains nothing to append, so its key produces no pair while other properties continue to serialize normally. This tool is free to use. No account or payment is required.
Last updated
The builder iterates array values and calls URLSearchParams.append for each item. With an empty array, that loop has no items.
This differs from null or an empty string, both of which create one explicit empty pair.
Only q is emitted.
{"tag":[],"q":"vetatool"}q=vetatoolCommon questions
No. It is valid input and simply emits no pairs for that property.
Use an empty string or null if an explicit empty value is required.
No. Non-empty arrays use repeated plain keys.
Debugging a specific Query String issue? Browse Query String troubleshooting.