Sample code for 30+ languages & platforms
Swift

Transition from Http.LastJsonData to Http.GetLastJsonData

See more HTTP Examples

Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    let http = CkoHttp()!

    // ...
    // ...

    // ------------------------------------------------------------------------
    // The LastJsonData method is deprecated:

    var json1: CkoJsonObject? = http.lastJsonData()
    print("\(json1!.emit()!)")
    json1 = nil

    // ------------------------------------------------------------------------
    // Do the equivalent using GetLastJsonData.

    let json2 = CkoJsonObject()!
    http.getLastJsonData(json: json2)
    print("\(json2.emit()!)")

}