title: How Can I Deserialize Json With F#?
body: <p>I am attempting to deserialize some very simple json into F# with Newtonsoft.Json 5.0.4:</p>
  
  <pre><code>#if INTERACTIVE
  #r "C:/Users/OCatenacci/fshacks/CreateWeeklySWEEventsEmail/packages/Newtonsoft.Json.5.0.4/lib/net40/Newtonsoft.Json.dll"
  #endif 
  
  open System
  open Newtonsoft.Json
  
  type meta() = class
      member val count = 0 with get, set
      end
  
  let testjson = """{
      "meta": {
          "count": 15
      }
  }"""
  
  
  let o = JsonConvert.DeserializeObject&lt;meta&gt;(testjson)
  </code></pre>
  
  <p>meta always gets a 0 in the count.  By the way, I was originally defining meta like this:</p>
  
  <pre><code>type meta = {
     count: int
  }
  </code></pre>
  
  <p>And I changed to using the Automatic property because I thought that Newtonsoft.Json might not be able to construct the object correctly.</p>
  
  <p>I would be surprised if my version of F#/Windows makes a difference in this case but just for sake of completeness: I'm trying this with the F# 3.0 Repl (11.0.60315.1) and I'm running on a Win7 x64 (SP1) box.  </p>