title: Problem with jQuery post to ASP.NET Core controller
body: <p>I have gone through this <a href="https://stackoverflow.com/questions/46113597/asp-net-core-2-jquery-post-data-null">solution</a> on stackoverflow but I couldn't solve my problem. </p>
  
  <p>In <strong>HomeController</strong> I have a method named as <strong>Audit</strong> which I want to be posted from /Home/Index page's script through jQuery. The controller looks like:</p>
  
  <pre><code>public class HomeController : Controller
  {
    [HttpPost]
    [ValidateAntiForgeryToken]
  
    public JsonResult Audit([FromBody] JObject jObject)
    {
         if (jObject != null)
         {
             return Json("success");
         }
         return Json("failed");
    }
  }
  </code></pre>
  
  <p>In the /Home/Index pages's javascript file I have tried to post a JSON Object to that Audit in a way like this:</p>
  
  <pre><code>var auditData = {};
  $(document).ready(function(){
      var request = $.getJSON('http://www.geoplugin.net/json.gp', function (responseData, status) {
          auditData = {
              Latitude : responseData.geoplugin_latitude,
              Longitude : responseData.geoplugin_longitude
          };
  
          $.post('Audit', auditData, function (response) {
              console.log(response);
          });
      });
  });
  </code></pre>
  
  <p>I want the auditData object to be posted as JObject in /Home/Audit but something is going wrong. I think there is problem either in controller or, in <strong>$.post</strong> method. How can I solve this problem?</p>