title: Reading JSON using JSON.NET
body: <p>How to deserialize the following JSON using JSON.NET:</p>
  
  <pre><code>{
  "adjusted_amount":200.0,
  "amount":2,
  "uid":"admin",
  "extra_params": {"uid":"admin","ip":"83.26.141.183","user_agent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36"}
  }
  </code></pre>
  
  <p>I have the following code (but the problem is probably with 'extra_params' - it is not a string). I thought about creating new class for 'extra_params' but the problem is that the data in 'extra_params' may change. </p>
  
  <p>I DONT NEED TO READ EXTRA_PARAMS AT ALL. All info I need, I get from the first 3 JSON variables.</p>
  
  <p>My code:</p>
  
  <pre><code>public class RecData1
  {
      public string uid { get; set; }
      public int amount { get; set; }
      public int adjusted_amount { get; set; }
      public string extra_params { get; set; }
  }
  
  var data = JsonConvert.DeserializeObject&lt;RecData1&gt;(payload);
  </code></pre>
  
  <p>where payload = string pasted in the first quotation</p>
  
  <p>EDIT: The error I get now:</p>
  
  <pre><code>Error reading string. Unexpected token: StartObject. Path 'extra_params', line 1,     position 28.
  
  at Newtonsoft.Json.JsonReader.ReadAsStringInternal()
  at Newtonsoft.Json.JsonTextReader.ReadAsString()
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
  </code></pre>