title: Any way to make DataContractJsonSerializer serialize Dictionaries properly?
body: <p>The DataContractJsonSerializer is not able to serialize Dictionaries properly.</p>
  
  <p>Whereas JavaScriptSerializer serializes Dictionaries as <code>{"abc":"xyz","def":42}</code> 
  for example,
  the DataContractJsonSerializer gives <code>[{"Key":"abc","Value":"xyz"},{"Key":"def","Value":42}]</code> instead. </p>
  
  <p>This is really problematic and I want to know how can I serialize Dictionary objects correctly in my WCF service. I am looking for a solution that would require least amount of effort.</p>
  
  <p>ref: <a href="http://msdn.microsoft.com/en-us/library/bb412170.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/bb412170.aspx</a></p>
  
  <p>This is the workaround I finally used to serilize dictionaries properly in WCF: <a href="http://social.msdn.microsoft.com/forums/en-US/wcf/thread/765f1569-0422-4471-8ec2-1d03b2026771" rel="noreferrer">http://social.msdn.microsoft.com/forums/en-US/wcf/thread/765f1569-0422-4471-8ec2-1d03b2026771</a></p>