Table of Contents

Enum Casing

Namespace
ToSic.Sxc.WebApi
Assembly
ToSic.Sxc.WebApi.dll

Determines what casing to use when converting data to JSON. This is for the JsonFormatterAttribute. Can be used as flags, so you can say Casing = Casing.CamelCase or Casing = Casing.ObjectPascal | Casing.DictionaryCamel

[PublicApi]
[Flags]
public enum Casing

Fields

Camel = 1

Set casing to use camelCase for everything. This is how most JavaScript code expects the data. The opposite would be Preserve.

DictionaryCamel = 512

Set casing of Dictionaries to be camelCase. For example, Entity properties such as Birthday = birthday, FirstName = firstName. This would be Camel case.

DictionaryPreserve = 1024

Set casing of Dictionaries to be PascalCase. For example, Entity properties such as Birthday = Birthday, FirstName = firstName. This would be Camel case.

Preserve = 4

Set casing to use original name for everything - usually PascalCase as is common in C#. This is how conversion would have worked before v15, as the C# objects all use CamelCase internally. The opposite would be Camel