Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

JSON to Variant stripping spaces from string values -SOLVED (1 reply)

$
0
0
THIS WAS USER ERROR ON MY PART


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

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>