# C1.Web.Api.C1ApiController.Json

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Web_Api_C1ApiController_Json_" data-uid="C1.Web.Api.C1ApiController.Json*">Json Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Web_Api_C1ApiController_Json_" data-uid="C1.Web.Api.C1ApiController.Json*"></a>
<h4 id="C1_Web_Api_C1ApiController_Json__1___0_Newtonsoft_Json_JsonSerializerSettings_System_Text_Encoding_" data-uid="C1.Web.Api.C1ApiController.Json``1(``0,Newtonsoft.Json.JsonSerializerSettings,System.Text.Encoding)">Json&lt;T&gt;(T, JsonSerializerSettings, Encoding)</h4>
<div class="markdown level1 summary"><p>Creates a System.Web.Http.Results.JsonResult`1 (200 OK) with the specified values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected override JsonResult&lt;T&gt; Json&lt;T&gt;(T content, JsonSerializerSettings serializerSettings, Encoding encoding)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overrides Function Json(Of T)(content As T, serializerSettings As JsonSerializerSettings, encoding As Encoding) As JsonResult(Of T)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">T</span></td>
      <td><span class="parametername">content</span></td>
      <td><p>The content value to serialize in the entity body.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">JsonSerializerSettings</span></td>
      <td><span class="parametername">serializerSettings</span></td>
      <td><p>The serializer settings.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.encoding">Encoding</a></td>
      <td><span class="parametername">encoding</span></td>
      <td><p>The content encoding.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">JsonResult</span>&lt;T&gt;</td>
      <td><p>A System.Web.Http.Results.JsonResult`1 with the specified values.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td><p>The type of content in the entity body.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
