How to un escape strings extracted from json objects in java? -


in java program download json object, when string it, "what\'s" example, though in php put in "what's". has slashes escape quotes , possibly other characters. there java function can use unescape , turn "what's"?

jsonobject object = new jsonobject(response); firstname = object.getstring("firstname"); 

if mean remove slashes, use string.replace() method replace \ empty substring.

i think this

string s = yourstring.replace("\\","");   

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -