public enum JsonEnumFormat
Public Enumeration JsonEnumFormat
public enum class JsonEnumFormat
type JsonEnumFormat
PascalCase | 0 |
Represents Pascal casing, eg. EnumValue.
Assuming that enums already use Pascal casing as per .NET conventions this formatting preserves the original format. When using the ToJsonTEnum(TEnum, JsonEnumFormat, String) method it adjusts only the first character if that is not an upper case one. |
CamelCase | 1 |
Represents camel casing, eg. enumValue.
Assuming that enums use Pascal casing as per .NET conventions this formatting adjusts the first character only. When using the ToJsonTEnum(TEnum, JsonEnumFormat, String) method it adjusts only the first character if that is not a lower case one. |
LowerCase | 2 | Represents lower casing, eg. enumvalue. Possible underscores are not removed from the result. |
UpperCase | 3 | Represents upper casing, eg. ENUMVALUE. Possible underscores are not removed from the result. |
LowerCaseWithUnderscores | 4 |
Represents lower casing with underscores, eg. enum_value.
Assuming that enums use Pascal casing as per .NET conventions this formatting just inserts underscores before the originally upper case letters, except the first one. If the original value also contains underscores, then they might be duplicated in the result. For such enums use the LowerCase formatting instead. |
UpperCaseWithUnderscores | 5 |
Represents upper casing with underscores, eg. ENUM_VALUE.
Assuming that enums use Pascal casing as per .NET conventions this formatting just inserts underscores before the originally upper case letters, except the first one. If the original value also contains underscores, then they might be duplicated in the result. For such enums use the UpperCase formatting instead. |
LowerCaseWithHyphens | 6 |
Represents lower casing with hyphens, eg. enum-value.
Assuming that enums use Pascal casing as per .NET conventions this formatting just inserts hyphens before the originally upper case letters, except the first one. If the original value contains underscores, then they also will be preserved. |
UpperCaseWithHyphens | 7 |
Represents upper casing with hyphens, eg. ENUM-VALUE.
Assuming that enums use Pascal casing as per .NET conventions this formatting just inserts hyphens before the originally upper case letters, except the first one. If the original value contains underscores, then they also will be preserved. |
Number | 8 | Represents numeric formatting of enum values even if they have named representation. The result JsonValue will have Number Type. |
NumberAsString | 9 | Represents numeric formatting of enum values even if they have named representation. The result JsonValue will have String Type. |