JsonNamingPolicy
Determines the naming policy used to convert a string-based name to another format, such as a camel-casing format.
using System.Runtime.CompilerServices;
namespace System.Text.Json
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class JsonNamingPolicy
{
public static JsonNamingPolicy CamelCase { get; } = new JsonCamelCaseNamingPolicy();
public static JsonNamingPolicy SnakeCaseLower { get; } = new JsonSnakeCaseLowerNamingPolicy();
public static JsonNamingPolicy SnakeCaseUpper { get; } = new JsonSnakeCaseUpperNamingPolicy();
public static JsonNamingPolicy KebabCaseLower { get; } = new JsonKebabCaseLowerNamingPolicy();
public static JsonNamingPolicy KebabCaseUpper { get; } = new JsonKebabCaseUpperNamingPolicy();
public abstract string ConvertName(string name);
}
}