(C) 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.
#include <C_CkHttp.h>
#include <C_CkJsonObject.h>
void ChilkatSample(void)
{
HCkHttp http;
HCkJsonObject json1;
HCkJsonObject json2;
http = CkHttp_Create();
// ...
// ...
// ------------------------------------------------------------------------
// The LastJsonData method is deprecated:
json1 = CkHttp_LastJsonData(http);
printf("%s\n",CkJsonObject_emit(json1));
CkJsonObject_Dispose(json1);
// ------------------------------------------------------------------------
// Do the equivalent using GetLastJsonData.
json2 = CkJsonObject_Create();
CkHttp_GetLastJsonData(http,json2);
printf("%s\n",CkJsonObject_emit(json2));
CkHttp_Dispose(http);
CkJsonObject_Dispose(json2);
}
|