I am trying to send a JSON as string to an API but it appears Wix keeps adding the slashes (") which the API doesn’t like.
How can I send the JSON as string without those slashes?
Did you figure this out having same issue as replacing a forward slash on the backend doesn’t seem to work.
I did. I was over stringifying the Json, if that is a term. Once I was able to send it in the right format it worked.
Do you know how to remove forward slash in backend code. Seems like nothing works. I have tried replace, split and join. Nothing seems to work. Another weird thing is if I just do static string and print out to console and a lot of my forward slashes get removed before I even try to manipulate the string. This is in my http-request file.
Yeah special use characters within your data can present a problem. I would say first see if you can avoid the characters in the data. If not then you need to some data manipulation to remove/replace them before processing it in JS.
I have the same issue. I need the back slashes gone. How do I do that? This is what’s happening:
And this is the code I’m using:
I just solve my own answer. Get rid of stringify.