restsharp/RestSharp — pull request #291 by petejohanson (2012-06-25 22:23:59+00:00)
Title: Allow deserializing a single item into a List<T> field, for JSON that on...

...ly uses a list when there's more than one item for a given field.

Working on implementing support for deserializing HAL (JSON hypermedia stuff), and the spec allows the links objects to be either an array of links, or a single link, if present. e.g.:

{
"_links": {
"next": { "href": "/items/next" }
}
}

or:

{
"_links": {
"dogs": [ { "href": "/dogs/1" }, { "href": "/dogs/2" } ]
}
}

This lets you handle it the same way!