I am using the official JSON library for my java project ad i have noticed something weird.
If i have a json such as this:
{
"text": "This is a multiline\n text"
}
And i try to get the string like this:
System.out.println(jsonObject.getString("text"));
I get this on the output:
This is a multiline\n text
Instead of :
This is a multiline
text
Anyone know of the correct way to handle the special characters such as \n and \t? I could always replace each one but I would have to handle all of them one by one.