title: Using .Net Core Web API with JsonPatchDocument
body: <p>I am using <code>JsonPatchDocument</code> to update my entities, this works well if the <code>JSON</code> looks like the following</p>
  
  <pre class="lang-json prettyprint-override"><code>[
    { "op": "replace", "path": "/leadStatus", "value": "2" },
  ]
  </code></pre>
  
  <p>When i create the object it converts it with the <code>Operations</code> node</p>
  
  <pre class="lang-cs prettyprint-override"><code>var patchDoc = new JsonPatchDocument&lt;LeadTransDetail&gt;();
  patchDoc.Replace("leadStatus", statusId); 
  
  {
    "Operations": [
      {
        "value": 2,
        "path": "/leadStatus",
        "op": "replace",
        "from": "string"
      }
    ]
  }
  </code></pre>
  
  <p>if the JSON object looks like that the Patch does not work. I believe that i need to convert it using</p>
  
  <pre class="lang-cs prettyprint-override"><code>public static void ConfigureApis(HttpConfiguration config)
  {
      config.Formatters.Add(new JsonPatchFormatter());
  }
  </code></pre>
  
  <p>And that should sort it out, the problem is i am using .net core so not 100% sure where to add the <code>JsonPatchFormatter</code></p>