Request

  • Returns a JSON object contained in a result type constructed from the response data using JSONSerialization with the specified reading options.

    Declaration

    Swift

    public static func serializeResponseSwiftyJSON(
        options: JSONSerialization.ReadingOptions,
        response: HTTPURLResponse?,
        data: Data?,
        error: Error?)
        -> Result<JSON>

    Parameters

    options

    The JSON serialization reading options. Defaults to .allowFragments.

    response

    The response from the server.

    data

    The data returned from the server.

    error

    The error already encountered if it exists.

    Return Value

    The result data type.