I have a RESTful web application that supports multiple sort fields on a collection of items. Is there a common convention for encoding these sort fields into the query string o
What about a fully PHP compliant version like this one:
http://myapp.com/books?sort[0][name]=author&sort[0][dir]=asc&sort[1][name]=datepublished&sort[1][dir]=desc&count=12
A bit longer but much convinient and as I've said, compliant with PHP. ASP.NET might have implemented support for this format also.
This will create an array, sort, directly where each element of sort has a name and dir property.