PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → consuminga json webservice
consuminga json webservice
Débuté par wduser, 08 aoû. 2018 11:52 - 1 réponse
Posté le 08 août 2018 - 11:52
Hi

I am trying to consume a webservice witch returns json…. Well I am a bit stuck. I can not get the return string to convert to a variant.

I need to import some currencies. The help gives me this: But stops there:

h is httpRequest h..Method = httpGet h..URL = "http://apilayer.net/api/live…" r is restResponse = RESTSend(h) info(r.content)
But how do I get this to a variant?

buffervar is Buffer = r.Content

( if I click on the buffervar in debug mode then I can select Json and I see exactly what I want.


regards







Regards
Posté le 08 août 2018 - 12:12
Hi, the JSONToVariant() function is your friend