title: How to deserialise JSON to FHIR valueset resource in .net
body: <p>I'm having trouble casting a a response from a valueset expansion to the valueset resource object in c#.</p>
  
  <p>I'm currently using RestSharp, the REST call is successful, and the following outputs the expected JSON.</p>
  
  <pre><code>IRestResponse response = client.Execute(request);
  var result = JsonConvert.DeserializeObject(response.Content);
  Console.WriteLine(result);
  </code></pre>
  
  <p>I've tried</p>
  
  <pre><code>var result = JsonConvert.DeserializeObject&lt;ValueSet&gt;(response.Content);
  </code></pre>
  
  <p>But it produces a null object. I'm sure I'm making some rookie error, and perhaps should look into using the Hl7.Fhir.Rest instead of RestSharp?</p>