# C1.Web.Mvc.Serialization.JsonConvertHelper.C1Json

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Web_Mvc_Serialization_JsonConvertHelper_C1Json_" data-uid="C1.Web.Mvc.Serialization.JsonConvertHelper.C1Json*">C1Json Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Web_Mvc_Serialization_JsonConvertHelper_C1Json_" data-uid="C1.Web.Mvc.Serialization.JsonConvertHelper.C1Json*"></a>
<h4 id="C1_Web_Mvc_Serialization_JsonConvertHelper_C1Json_Microsoft_AspNetCore_Mvc_Controller_System_Object_System_Boolean_" data-uid="C1.Web.Mvc.Serialization.JsonConvertHelper.C1Json(Microsoft.AspNetCore.Mvc.Controller,System.Object,System.Boolean)">C1Json(Controller, object, bool)</h4>
<div class="markdown level1 summary"><p>Creates a Microsoft.AspNetCore.Mvc.JsonResult object that serializes the specified
data object to JSON.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static JsonResult C1Json(this Controller controller, object data, bool useCamelCasePropertyName = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function C1Json(controller As Controller, data As Object, Optional useCamelCasePropertyName As Boolean = True) As JsonResult</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.mvc.controller">Controller</a></td>
      <td><span class="parametername">controller</span></td>
      <td><p>The specified controller.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The object to serialize.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">useCamelCasePropertyName</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value decides whether to use camel case to serialize the data.</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.mvc.jsonresult">JsonResult</a></td>
      <td><p>The created Microsoft.AspNetCore.Mvc.JsonResult that serializes the specified data
to JSON format for the response.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Web_Mvc_Serialization_JsonConvertHelper_C1Json_" data-uid="C1.Web.Mvc.Serialization.JsonConvertHelper.C1Json*"></a>
<h4 id="C1_Web_Mvc_Serialization_JsonConvertHelper_C1Json_System_Object_System_Boolean_" data-uid="C1.Web.Mvc.Serialization.JsonConvertHelper.C1Json(System.Object,System.Boolean)">C1Json(object, bool)</h4>
<div class="markdown level1 summary"><p>Creates a Microsoft.AspNetCore.Mvc.JsonResult object that serializes the specified
data object to JSON.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static JsonResult C1Json(object data, bool useCamelCasePropertyName = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function C1Json(data As Object, Optional useCamelCasePropertyName As Boolean = True) As JsonResult</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The object to serialize.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">useCamelCasePropertyName</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value decides whether to use camel case to serialize the data.</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.mvc.jsonresult">JsonResult</a></td>
      <td><p>The created Microsoft.AspNetCore.Mvc.JsonResult that serializes the specified data
to JSON format for the response.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
