This project is read-only.

Simple arrays from query string

Topics: ASP.NET Web API
Jan 30, 2014 at 9:01 PM
According to the what's new in webapi 2.1 page support has been added for "Query Parsing for the Client Formatting Library". The example URI is http://api/something?catId=3&catId=4&dogId=1,2. So I made a quick endpoint to try this out.
        [Route( "something" )]
        public object something( [FromUri] List<int> catId = null, [FromUri] List<int> dogId = null ) {
            return new {
Using the URI above the returned object is:
  "catId": [
  "dogId": [
So I see that webapi is properly parsing the catId like it always has but apparently this new feature doesn't carry over to the controller endpoints. What gives?