Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create HTTP Request object
Message
De
24/12/2016 05:24:51
 
 
À
24/12/2016 05:10:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01645753
Message ID:
01646014
Vues:
45
>>>Here is my sample Json-formated string:
>>>
>>>
>>>cJsonStr = [{"access_token":"OCu_7Rt","token_type":"bearer","expires_in":1209599,
>>> ".issued":"Fri, 23 Dec 2016 21:58:29GMT",".expires":"Fri, 06 Jan 2017 21:58:29 GMT",
>>> "issued":"Fri, 23 Dec 2016 21:58:29GMT","expires":"Fri, 06 Jan 2017 21:58:29 GMT"}]
>>>
>>
>>I would worry about ".expires" and ".issued" as identifiers. Too lazy to look up if specific rules for JSON "key" naming exists, but starting with a period could create invalid property names if using eval() on JSON as some languages allow. OTOH: If you view the JSON just as a serialization of a hashmap, starting the hashmaps key with a period might not be forbidden, similar to vfp not allowing field names starting with a period, but a search field, which is indexed, can start with it.
>
>I believe the library takes care of that, since it serializes the JSON keys as properties of an VFP Empty object. EVAL() them is safe, afterwards.

See slightly altered example of possible lookup-table / hashmap entries hard to consolidate on 1 object even when massaging property names ;-)
I was talking about loJson = eval(lcJSON) available in JS and Python at least
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform