title: C# Json To Dictionary of Objects
body: <p>I want to take some Json and parse it in to a collection of key/value pairs, but some of the values will be dictionaries themselves. I tried the usual Newtonsoft deserialization. It's close, but not quite right. The end result must be a dictionary, not a strongly typed class.</p>
  
  <p>This is some example Json:</p>
  
  <pre><code>{
    "JobNumber": 1010,
    "Asset": null,
    "JobNotes": [
      {
        "NoteText": "It's not working.",
        "NoteType": "Complaint"
      },
      {
        "NoteText": "Needs to be fixed",
        "NoteType": "Job"
      }
    ]
  }
  </code></pre>
  
  <p>This is the code I used to deserialize:</p>
  
  <pre><code>        var json = File.ReadAllText(@"c:\temp\job.json");
          var result = JsonConvert.DeserializeObject&lt;Dictionary&lt;string, object&gt;&gt;(json);
  </code></pre>
  
  <p>The result is almost correct, but the value of the item with a key of "JobNotes" is just json string. I want the parser to recurse in and deserialise the inner Json to a further dictionary of strings and objects. <strong>Is there a way I can do this with the Newtonsoft library? Or, is there another library that will do the trick? Can I hook in to the parsing method to override the functionality at that point in time?</strong></p>