SmartKeyEncodingStrategy

public enum SmartKeyEncodingStrategy : Sendable

Undocumented

  • Use the keys specified by each type. This is the default strategy.

    Declaration

    Swift

    case useDefaultKeys
  • Convert from “camelCaseKeys” to “snake_case_keys” before writing a key to JSON payload. For example, oneTwoThree becomes one_two_three. _oneTwoThree_ becomes _one_two_three_.

    Declaration

    Swift

    case toSnakeCase
  • Convert the first letter of the key to lower case before attempting to match a key with the one specified by each type. For example, OneTwoThree becomes oneTwoThree.

    Declaration

    Swift

    case firstLetterLower
  • Convert the first letter of the key to upper case before attempting to match a key with the one specified by each type. For example, oneTwoThree becomes OneTwoThree.

    Declaration

    Swift

    case firstLetterUpper