Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

json serialize object capitalization config

protected void Application_Start() {
    JsonConfig.Configure();   
}

public static class JsonConfig
{
    public static void Configure(){
        var formatters = GlobalConfiguration.Configuration.Formatters;
        var jsonFormatter = formatters.JsonFormatter;
        var settings = jsonFormatter.SerializerSettings;

        settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: for loop c# to print times tables 
Csharp :: scaffolding in vs22 asp.net 6 
Csharp :: how to make a chunk loader in c# 
Csharp :: c# null check 
Csharp :: asp.net store list in web.config 
Csharp :: c# predicate 
Csharp :: c# check multiple variables for null 
Csharp :: C# wpf show hidden window 
Csharp :: wpf button to return to last window 
Csharp :: scale min max to 0 1 
Csharp :: C# HttpUtility not found / missing C# 
Csharp :: user (current login user) in viewcomponent 
Csharp :: camera is rendering black screen unity 
Csharp :: c# enum key value 
Csharp :: c# windows forms how to get controls in gropu box 
Csharp :: How to change color of a column in RDLC report 
Csharp :: serach a keyword in whole database 
Csharp :: negative indexing in c# 
Csharp :: firefoxoptions setpreference to trust certificates 
Csharp :: csgo crashes at retrieving game data 
Csharp :: c# ? behind variable 
Csharp :: unity player movement script 3d 
Csharp :: unity how to change visual studio version 
Csharp :: salary, overtime, deductions, gross pay and netpay in console C# 
Csharp :: mydata api .net 
Csharp :: DataTable GetErrors 
Csharp :: sqlite dapper bulkcopy 
Csharp :: Convert C# Class to xml wth xsd.exe 
Csharp :: c# use readonly array as method default 
Csharp :: asp.net mvc select from many to many relationship 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =