title: Error trying to send json to WebAPI controller method using curl
body: <p>My controller method:</p>
  
  <pre><code>[HttpPost]
  public void Post([FromBody] string vehicleDescriptors)
  {
      var vehicles = JsonConvert.DeserializeObject&lt;IList&lt;VehicleDescriptorModel&gt;&gt;(vehicleDescriptors);
  
      MvcApplication.HubHelper.DataChanged(vehicles);
  }
  </code></pre>
  
  <p>My json file contents:</p>
  
  <pre><code>{
    vehicleDescriptors:
      [
          {
              "Id":"A20940",
              "Type":"AUGER",
              "Organization":"OPERATIONS",
              "Office":"South Boston",
              "ReportedTimestamp":"\\/Date(1406218241000)\\/",
              "ReceivedTimestamp":"\\/Date(1406218227000)\\/",
              "Latitude":36.71,
              "Longitude":-78.9061,
              "Speed":0,
              "Heading":345,
              "Proximity":86978.617892562324
          }
      ]
  }
  </code></pre>
  
  <p>the curl statement I'm running:</p>
  
  <pre><code>curl "http://localhost/Web/api/vehicledescriptor/Post" -H "Content-Type: application/x-www-form-urlencoded" --data @vehicleDescriptors.json
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>curl "http://localhost/Web/api/vehicledescriptor/Post" -H "Content-Type: application/json" --data @vehicleDescriptors.json
  </code></pre>
  
  <p>I'm getting this error when it tries to deserialize, and when I debug, the vehicleDescriptors parameter is null:</p>
  
  <pre><code>{
  "Message":"An error has occurred.",
  "ExceptionMessage":"Value cannot be null. Parameter name: value",
  "ExceptionType":"System.ArgumentNullException",
  "StackTrace":"   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)"
  }
  </code></pre>
  
  <p>What am I doing wrong here?</p>