How to access the below fields of this structure using lib curl write_data pointer variable.

typedef struct RESPONSE { char* msg;
char* sn;
char* gsn;
char* veType;
char* model;
char* deviceKey;
char* responseCode; }responsedata , responseptr;

I should fill the below values for each member variable of the above structure. The values to be filled are :

{"message":"RequestApproved","serialNumber":"567123","model":"QPPR","deviceKey" :"d64225486abc4b449bcb9f4e51af31b2e00a9a3b639482b50cd4cc3cee854823588b91565ae2a2 8defcd89dfaeb601c587cdce7a8c6c6f94c593a050dd60376d","responseCode":0,"gatewaySer ialNumber":"c177a3c9-d892-4975-8df8-662059c2aec6","veType":"XXLite"}

I used the below curl functions

curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &resp);

Please help me to fill the structure member variables using the resp pointer.

What do you have for WriteMemoryCallback?

It should at least start like this:

size_t WriteMemoryCallback(char *ptr, size_t size, size_t nmemb, void *userdata)

Everything you need to know is here: