Huh. In some respects, I'd be tempted to say that Json.NET is right - you can't deserialize an array into a dictionary. Does the bit below work better: string json = "{\"jobId\":\"jeabfba358b69412abeafd63e415957bf\",\"jobStatus\":\"esriJobWaiting‌​\"," + "\"results\":{},\"inputs\":{},\"messages\":[]}"; Here, we're saying that both results and inputs are null objects, not empty arrays.
–
HerbOct 5 '10 at 17:48

So you're going to be getting broken json data? Ick. With respect to the null values, have you played with the JsonSerializerSettings to see if those would help you out? It seems as though you could set NullValueHandling to Ignore, and it would leave the dictionaries alone (assuming you'd created them in the class constructor).
–
HerbOct 5 '10 at 18:31

Setting to ignore fixes it so my member dictionaries aren't set to null, they remain empty dictionaries, created in the constructor. Thanks again.
–
Kirk KuykendallOct 5 '10 at 18:46

2 Answers
2

According to this, I'm going to say probably not, at least not without doing some extra work yourself. You can override the values used for Key and Value, but you're going to get the same thing as you have. You need a way to ditch representation of properties as a collection - as the underlying runtime appears to treat the dictionary as IEnumerable.

I think the short answer is to not use DataContractSerializer, and instead use an alternative method, such as Json.NET.