Configuration

public struct Configuration

Used to capture URLForm Coding Configuration used for decoding

  • Supported date formats

    See more

    Declaration

    Swift

    public enum DateDecodingStrategy
  • Creates a new URLEncodedFormCodingConfiguration.

    Declaration

    Swift

    public init(
        boolFlags: Bool = true,
        arraySeparators: [Character] = [",", "|"],
        dateDecodingStrategy: DateDecodingStrategy = .secondsSince1970
    )

    Parameters

    boolFlags

    Set to true allows you to parse flag1&flag2 as boolean variables where object with variable flag1 and flag2 would decode to true or false depending on if the value was present or not. If this flag is set to true, it will always resolve for an optional Bool.

    arraySeparators

    Uses these characters to decode arrays. If set to ,, arr=v1,v2 would populate a key named arr of type Array to be decoded as ["v1", "v2"]

    dateDecodingStrategy

    Date format used to decode a date. Date formats are tried in the order provided