Skip to content

Initializer

init(boolFlags:arraySeparators:dateDecodingStrategy:userInfo:)

init(boolFlags: Bool = true, arraySeparators: [Character] = [",", "|"], dateDecodingStrategy: URLEncodedFormDecoder.Configuration.DateDecodingStrategy = .secondsSince1970, userInfo: [CodingUserInfoKey : any Sendable] = [:])

Parameters

boolFlags

When true, form data such as flag1&flag2 will be interpreted as boolean flags, where the resulting value is true if the flag name exists and false if it does not. When false, such data is interpreted as keys having no values.

arraySeparators

A set of characters to be treated as value separators for array values. For example, using the default of [",", "|"], both arr=v1,v2 and arr=v1|v2 are decoded as an array named arr with the two values v1 and v2.

dateDecodingStrategy

The URLEncodedFormDecoder.Configuration.DateDecodingStrategy to use for date decoding.

userInfo

Additional and/or overriding user info keys for the underlying Decoder (you probably don’t need this).