title: C# Set Casing Convention Globally for Azure Function v3
body: <p>I am new to Azure Functions and trying to convert .NET Core APIs to Azure Functions. The problem I am facing is how to globally set response naming convention (JSON). By default, it is <code>CamelCase</code> but I want to use <code>PascalCase</code>, all the solutions I found on internet were to modify the response in each function / endpoint. I would like to set it up globally</p>
  <p>I had already added <code>Startup.cs</code> to configure DIs. Here is what I have tried in attempt to configure response JSON naming convention:</p>
  <pre><code>public override void Configure(IFunctionsHostBuilder builder)
  {
      builder.Services.AddMvcCore().AddJsonOptions(m =&gt;
      {
          m.JsonSerializerOptions.PropertyNamingPolicy = null;
      });
  
      builder.Services.Configure&lt;JsonSerializerSettings&gt;(m =&gt;
      {
          m.ContractResolver = new DefaultContractResolver();
      });
  
      builder.Services.Configure&lt;JsonSerializerOptions&gt;(m =&gt;
      {
          m.DictionaryKeyPolicy = null;
          m.PropertyNamingPolicy = null;
      });
  
      builder.Services.Configure&lt;JsonOptions&gt;(m =&gt;
      {
          m.JsonSerializerOptions.DictionaryKeyPolicy = null;
          m.JsonSerializerOptions.PropertyNamingPolicy = null;
      });
  
      .....
  }
  </code></pre>
  <p>Function Example (both return same response, which is CamelCased):</p>
  <pre><code>[FunctionName(nameof(Get))]
  public async Task&lt;IEnumerable&lt;AppComponentViewModel&gt;&gt; Get([HttpTrigger(AuthorizationLevel.Function, &quot;get&quot;, Route = &quot;AppComponent/Get&quot;)] HttpRequest request)
  {
      var appComponents = await _appComponentRepository.GetAll();
      return ToList(appComponents);
  }
  
  [FunctionName(nameof(Get))]
  public async Task&lt;ActionResult&lt;IEnumerable&lt;AppComponentViewModel&gt;&gt;&gt; Get([HttpTrigger(AuthorizationLevel.Function, &quot;get&quot;, Route = &quot;AppComponent/Get&quot;)] HttpRequest request)
  {
      var appComponents = await _appComponentRepository.GetAll();
      return Ok(ToList(appComponents));
  }
  </code></pre>