I have a JSON response where all the double quotes are delimited with \
. So to print contents as JSON format, I need to replace \"
with "
.
I'm using Java's string replaceAll
method to do so, but couldn't achieve the same.
Something like below to get replace \" with "
String name ="{
id: 1,
name: "Leanne Graham",
username: "Bret",
email: "Sincere@april.biz",
address: {
street: "Kulas Light",
suite: "Apt. 556",
city: "Gwenborough",
zipcode: "92998-3874",
geo: {
lat: \"-37.3159\",
lng: \"81.1496\"
}";
name.replaceAll("\"",""");