NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on September 05, 2019, 11:23:36 AM
-
Hi, I need to send the response without <13,10>, like:
{"CODRTN":"00","SALDOS":"000001958935100","SIGNO1":"+","SACTU":"000001958935100","SIGNO2":"+","DOCUM":"000000880000107","LOCAL":"000000055100107","CANEXT":"000"}
How to do it?
-
In the NetWebServiceMethod, Return tab. Change "Format return for" to Compactness.
-
Thanks, another one...
Im ask to response with a width of 869 chars
I have two values that are strings and may have trailing spaces and I need to send this spaces to keep the width but the values in the json response are clipped
how can I do it?
-
>>I'm ask to response with a width of 869 chars
Where do you find these sorts of ridiculous requirements? :)
this is "just wrong"..... in so many ways...
yes, your response is going to get clipped. Yes, JSON has a variable length....
I guess put a . at the end of the response string or something like that?
Cheers
Bruce
-
It is a requeriment from an ATM system to validate the credit of a client.
Will try if they accept a dot at the end.
-
It is a requeriment from an ATM system to validate the credit of a client.
Will try if they accept a dot at the end.
Alberto,
in HTML there is a "non-breaking space" to force a space character.
This in needed sometimes, like > < here because the browser reduces the number of spaces between two characters, like between two words, no matter how many spaces you have added into your source.
For this is used. It has its equivalent on   and perhaps it could work for you by filling the end of your string with this garbage?
This is it how the line above looks like, what the browser returns:
This in needed sometimes, like > < here because.......
Just a wild guess from me.....
Wolfgang
-
Wolfgang, this is JSON not HTML, so does not apply.
cheers
Bruce
-
Alberto, your best bet may be to put the JSON into a StringTheory object, then pad it out to the length you want.
Then return the StringTheory object.
cheers
Bruce
-
Thanks Bruce, Ive add a <160> to the string before the json is made and then a packet.replace after and it works ok.
By the way... had you seen my post about: "Problem when syncing spanish caracters:" ?
-
yes, I've seen the post, but I can only investigate that in the office tomorrow.