(Java) Transition from Http.LastJsonData to Http.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.Note: This example requires Chilkat v11.0.0 or greater.
import com.chilkatsoft.*;
public class ChilkatExample {
static {
try {
System.loadLibrary("chilkat");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
CkHttp http = new CkHttp();
// ...
// ...
// ------------------------------------------------------------------------
// The LastJsonData method is deprecated:
CkJsonObject json1 = http.LastJsonData();
System.out.println(json1.emit());
// ------------------------------------------------------------------------
// Do the equivalent using GetLastJsonData.
CkJsonObject json2 = new CkJsonObject();
http.GetLastJsonData(json2);
System.out.println(json2.emit());
}
}
|