Protocol

SingleValueDecodingContainer

A container that can support the storage and direct decoding of a single nonkeyed value.

Declaration

protocol SingleValueDecodingContainer

Topics

Instance Properties

var codingPath: [CodingKey]

The path of coding keys taken to get to this point in encoding.

Required.

Instance Methods

func decode(UInt8.Type) -> UInt8

Decodes a single value of the given type.

Required.

func decode(Int64.Type) -> Int64

Decodes a single value of the given type.

Required.

func decode(UInt32.Type) -> UInt32

Decodes a single value of the given type.

Required.

func decode(Int32.Type) -> Int32

Decodes a single value of the given type.

Required.

func decode(Int8.Type) -> Int8

Decodes a single value of the given type.

Required.

func decode(Int.Type) -> Int

Decodes a single value of the given type.

Required.

func decode(Int16.Type) -> Int16

Decodes a single value of the given type.

Required.

func decode(Double.Type) -> Double

Decodes a single value of the given type.

Required.

func decode(String.Type) -> String

Decodes a single value of the given type.

Required.

func decode(UInt16.Type) -> UInt16

Decodes a single value of the given type.

Required.

func decode(UInt64.Type) -> UInt64

Decodes a single value of the given type.

Required.

func decode(UInt.Type) -> UInt

Decodes a single value of the given type.

Required.

func decode(Float.Type) -> Float

Decodes a single value of the given type.

Required.

func decode(Bool.Type) -> Bool

Decodes a single value of the given type.

Required.

func decode<T>(T.Type) -> T

Decodes a single value of the given type.

Required.

func decodeNil() -> Bool

Decodes a null value.

Required.

See Also

Decoding Containers

struct KeyedDecodingContainer

A concrete container that provides a view into a decoder’s storage, making the encoded properties of a decodable type accessible by keys.

protocol KeyedDecodingContainerProtocol

A type that provides a view into a decoder’s storage and is used to hold the encoded properties of a decodable type in a keyed manner.

protocol UnkeyedDecodingContainer

A type that provides a view into a decoder’s storage and is used to hold the encoded properties of a decodable type sequentially, without keys.