I just hit a (to me) surprising behaviour of the JavaScriptSerializer, in that it serializes any IEnumberable as an array. I quite often define things like
Interface IFoo : IEnumerable<Bar> { int MyFoo {get;} string Wibble {get;} DateTime Wobble {get;} }
I was quite surprised this got serialized as a JS array of Bars. Is this considered reasonable behaviour? Should it change? What do others think about this?