Software Archive
Read-only legacy content
17061 Discussions

Integrating new Web Services

Ernani_R_
Beginner
576 Views

Hello everyone,

I was trying to integrate a new service to Intel XDK as the following tutorial: https://software.intel.com/en-us/videos/integrating-a-new-service. And everything went fine, except that in the end, on the response body, Intel XDK didn't recognized the JSON fields as it did with the ESPN API in the tutorial.

Capture.PNG

Instead, Intel XDK showed the response body entirely green. Anyone knows what it may possibly be wrong? I want to get the fields so I can create a data binding and use App Designer to put the content into a listview.

 

Thanks in advance, Ernani

0 Kudos
4 Replies
Elroy_A_Intel
Employee
576 Views

I will escalate your issue to someone on the Intel XDK Webservices team.

0 Kudos
Anjali_G_Intel
Employee
576 Views

The green color indicates the returned response is a string and not json. Look into your .js file or use the debug it button to make sure that this is not a string. You might need to use JSON.stringify. 

You can still create a data binding with this but cannot drive a listview the way the ESPN tutorial does. 

 

0 Kudos
Chris_P_Intel
Employee
576 Views

JSON.parse()

0 Kudos
sandeep_s_
Beginner
576 Views

Your data is not  proper JSON formate.

You can use this in php(Api provide source)
header('Content-Type: application/json');

 

0 Kudos
Reply