Array styles
- Brackets (default) —
tags[]=red&tags[]=blue. PHP, Rails, Node Express all accept this. - Indices —
tags[0]=red&tags[1]=blue. Useful when order matters and the server uses indexed access. - Repeat —
tags=red&tags=blue. ASP.NET, Java EE. - Comma —
tags=red,blue. Compact but breaks if values themselves contain commas.
FAQ
What about null and undefined?
Keys whose value is null are emitted as bare keys (foo); keys whose value is undefined are skipped. true/false become the literal strings.