how to get specific data from cocos2dx App42CustomCodeResponse?

0 votes

i received cocos2dx callback customcode 

 

customCodeService->RunJavaCode(servername, object, app42callback(customcode::onCustomCodeServiceRequestCompleted, this));

 

App42CustomCodeResponse *customCodeResponse = (App42CustomCodeResponse*)response;

i want to get string data from customCodeResponse such as "email", "username",

how can i get data from customCodeResponse ?

 

 

asked Nov 19, 2016 in Announcements by exceeduniverse (10 points)

1 Answer

0 votes

Hi,

Apologies for late reply,

In custom code, we give the response returned from the custom which you have written that can be fetched as follows:

customCodeResponse->getBody().c_str();

 

This will give json string which you need to parse to get the inside fields.

 

Please let me know if you have any queries.

 

Regards,

Rajeev

answered Nov 22, 2016 by rajeev.etc (1,660 points)
edited Nov 22, 2016 by rajeev.etc
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...