Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert an array string to VFP cursor/array
Message
De
07/01/2017 08:29:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01646369
Message ID:
01646384
Vues:
128
It might help if you start by converting this into an array. I.e.:
* Remove the braces
* Use alines() to convert to an array (using the ":" as a separator)
* Then you can parse each individual array element. For example, the first element will contain the text:
"Version":"2.2222"

>Hi,
>
>In one place of my app, the response of the Web API call is an "array" (I put the array in quotation marks because this is not exactly a VFP array). The "array" string looks like this:
>
>{"Version":"2.2222","Connected":true}
>
>
>I suppose I can parse this string to get the values. But I was wondering if there is a "better" way to convert this string to an array or a cursor?
>
>TIA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform