title: How do I parse this json-response?
body: <p>The response is structured like this, this is an extract, might be missing a curly brace:</p>
  
  <pre><code>{"2":{"date":1306411951,"price":4.8003,"low":"4.80000000","high":"4.80060000","nicedate":"15:12"},"6":{"date":1306418941,"price":4.654175,"low":"4.40000000","high":"4.80000000","nicedate":"17:02"}
  </code></pre>
  
  <p>And I get cast exceptions when parsing the response string even though all the datamembers in the object are strings.</p>
  
  <p>I'm using System.Runtime.Serialization.Json to deserialize the objects.</p>
  
  <p>Right now I'm doing it like this:</p>
  
  <pre><code>        Currency[] MapJSONToObjects(string jsonString)
      {
          using (var ms = new MemoryStream(Encoding.Unicode.GetBytes(jsonString)))
          {
              //Parse
              var ser = new DataContractJsonSerializer(typeof(Currency[]));
              Currency[] currencies = (Currency[])ser.ReadObject(ms);
              return currencies;
          }
      }
  </code></pre>