-
I'm migrating from Usually, this should work: services.AddControllers().AddJsonOptions(options =>
{
options.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
}); However, as far as I remember, OrchardCore doesn't allow calling I tried this approach but it doesn't work: public static void ConfigureServices(IServiceCollection services)
{
services.AddOrchardCms().AddSetupFeatures("OrchardCore.AutoSetup");
// I tried putting it everywhere: in application, in a module, etc -> not working!
services.Configure<JsonOptions>(options =>
{
options.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
});
} |
Beta Was this translation helpful? Give feedback.
Answered by
ns8482e
Oct 11, 2022
Replies: 1 comment 1 reply
-
@hieucd04 OC uses Newtonsoft.Json |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hieucd04
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@hieucd04 OC uses Newtonsoft.Json