Functions

The following functions are available globally.

  • Assigns the value of an optional to a property if it exists.

    Declaration

    Swift

    public func <= <T>(property: inout T, value: T?)

    Parameters

    property

    The value to set.

    value

    The optional to set the property with.

  • Assigns an instance of T to a property of type T if an instance of T can be created from a JSON instance.

    Throws

    Decoding errors when converting the JSON instance to T.

    Declaration

    Swift

    public func <= <T>(property: inout T, value: JSON?) throws where T : Decodable

    Parameters

    property

    The property to set.

    value

    The JSON to convert to T and assign to property.