FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
JSON to Variant stripping spaces from string values
JSON to Variant stripping spaces from string values
Débuté par steve erts, 10 avr. 2018 21:29 - 2 réponses
Connectez-vous…
steve erts
#1
Posté le 10 avril 2018 - 21:29
Hi,
I'm using JSONToVariant to take a JSON payload and convert into an object and write the elements out to our database. Everything is working fine EXCEPT that and string variable that contains spaces the spaces are removed.
sPayload = (the json file being inspected)
vPayload is Variant=JSONToVariant(sPayload)
IF vPayload.Client.Country<>"" THEN
Client.Country=vPayload.Client.Country
END
In the above example if the original value for "County" in the JSON file is "United States" when it is written to the database the space is stripped out and the value saved is "UnitedStates"
What am I doing wrong?
Thanks!
Steve
Signaler
0
0
kingdr
#2
Posté le 11 avril 2018 - 02:43
Hi
Hard to say as 'dun know the content of json
sPayload = (the json file being inspected), ???
and you may chop part of yr JSON and show us if it's too lengthy.
Cheers
King
Signaler
0
0
steve erts
#3
Posté le 11 avril 2018 - 06:15
Thanks King. it was user error on my part
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte