Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

php - How to remove slash before and after my JSON string POST

Am using Flutter to POST an encrypted string I stored in my SharedPreference to my PHP JSON for some reason when I tried to retrieve the value to use and query database if such value is available it adds slash at the beginning and end of the value like this ""cbfddd256d9b5c5235f587415188ce2e36101c0c3269b6db398d4f53ad35898a"". I tried to trace it back to my Flutter code at the point of POST to see if that is where the extra slash came from but it wasn't there. Please can anyone help on how to remove the slash because my query returns null because of the extra slash

question from:https://stackoverflow.com/questions/65928355/how-to-remove-slash-before-and-after-my-json-string-post

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I guess you are sending it to pop as a string with two quotes " " so php add the slash maybe try sending it without the " "


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[2] html - How to create even cell spacing within a

2.1m questions

2.1m answers

60 comments

57.0k users

...