When serializing a collection of KeyValuePair with CamelCase enabled the properties are serialized in PascalCase:
MVC Configuration is:
.AddJsonOptions(options =>
{
options.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase;
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
}
The result is:
{ Key: "Test", Value: "Test1" }
Expected result:
{ key: "Test", value: "Test1" }