Android Question json response

tufanv

Expert
Licensed User
Longtime User
Hello

I am using mysql and php method to get data from my server. In my php code, php checks for something and give a json response and my app gets it.

Response from server: "This username already exists"
i want to do something if the response is "This username already exists" but because the response includes " at the start and end of the respnse : "This username already exists" i cant do what i want with If res= "This username already exists" . There must be a simple trick to achieve it but i cant find . Can you help me ?

TY
 

tufanv

Expert
Licensed User
Longtime User
I had to use substring2 to excldue them. If someone has a better idea i would like to listen =)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
show your php-code. The problem is here (or in the database :D)

Elsewhere you can use a string replace

B4X:
    Dim test As String = $""test""$
    Log(test)
    Log(test.Replace(Chr(34),""))
 
Upvote 0
Top