The following code shows that JSON.NET deserializes arrays as List<object>, but I want object[] instead. Is it possible?
> ((dynamic)JsonConvert.DeserializeObject<ExpandoObject>("{ \"foo\": 1, bar: [5, 6] }")).bar.GetType().FullName
"System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"
ExpandoObjectConverterthat constructs arrays instead of lists. Just doreturn list.ToArray();around line 106.barproperty asobject[]and deserialize to that instead ofExpandoObject.