KGy SOFT

JsonEnumFormat Enumeration

KGy SOFT JSON Libraries Help

Namespace:  KGySoft.Json
Assembly:  KGySoft.Json (in KGySoft.Json.dll) Version: 2.0.0
Syntax

public enum JsonEnumFormat
Members

  Member nameValueDescription
PascalCase0 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.
CamelCase1 Represents camel casing, eg. enumValue. Assuming that enums already 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.
LowerCase2 Represents lower casing, eg. enumvalue.
UpperCase3 Represents upper casing, eg. ENUMVALUE.
LowerCaseWithUnderscores4 Represents lower casing with underscores, eg. enum_value.
UpperCaseWithUnderscores5 Represents upper casing with underscores, eg. ENUM_VALUE.
LowerCaseWithHyphens6 Represents lower casing with hyphens, eg. enum-value.
UpperCaseWithHyphens7 Represents upper casing with hyphens, eg. ENUM-VALUE.
Number8 Represents numeric formatting of enum values even if they have named representation. The result JsonValue will have Number Type.
NumberAsString9 Represents numeric formatting of enum values even if they have named representation. The result JsonValue will have String Type.
See Also

Reference