Page MenuHomePhabricator

Handle complex paramters in query string
Closed, ResolvedPublic

Description

For parameters that takes more than a singe value (e.g. removed tags should take a map of tag names and boolean/class name), figure out how to do this with a query string. Json string should do the trick, but there may be standardized ways of doing this.

Event Timeline

Lists seems to use the syntax item1|item2|..., see explodeMultiValue.

Query strings of the format ?cars[]=Saab&cars[]=Audi seems to be handled as arrays by PHP, source: http://stackoverflow.com/a/9547490.

Since two dimensional arrays will be used and there doesn't seem to be any standard for this, JSON looks to be the way to go. This is also used by e.g. the Wikidata API: https://www.wikidata.org/w/api.php?action=help&modules=wbsetclaim.

Implemented this using JSON strings.