Enumeration

JSONDecoder.KeyDecodingStrategy

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

Overview

Topics

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(@escaping ([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.