aspose file tools*
The moose likes Java in General and the fly likes Strip slashes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Strip slashes" Watch "Strip slashes" New topic
Author

Strip slashes

Emir Bugra Koksalan
Greenhorn

Joined: Aug 23, 2012
Posts: 9

Hello everybody. I'm getting a java object as json by gson package but there is a problem. Gson returns an object like this:



I must convert this like that:



Please help meeee... Thanks..


www.kodmanyagha.org
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Welcome to the Ranch

Does that mean you are returned a String containing those backslashes? Have you come across the methods in the String class for replacing characters or substrings?
Emir Bugra Koksalan
Greenhorn

Joined: Aug 23, 2012
Posts: 9

thanks

i found the problem. my variable's type is String and struts adding slashes. I changed the variable type and solved

Thanks for reply.. Have a nice programmings...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Well done sorting it out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strip slashes