The values that determine how a type's coding keys are decoded from JSON keys.


enum JSONDecoder.KeyDecodingStrategy



Built-in Decoding

case convertFromSnakeCase

A key decoding strategy that converts snake-case keys to camel-case keys.

case useDefaultKeys

A key decoding strategy that doesn't change key names during decoding.

Custom Decoding

case custom(([CodingKey]) -> CodingKey)

A key decoding strategy defined by the closure you supply.

See Also

Customizing Decoding

var keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy

A value that determines how a type's coding keys are decoded from JSON keys.

var userInfo: [CodingUserInfoKey : Any]

A dictionary you use to customize the decoding process by providing contextual information.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software