I'm trying to parse XML
into JSON
using Java
. JSON.parse
is throwing this error on this character: 
JSON.parse: bad control character in string literal
I attempt to replace these characters before I send them to JSON.parse but this line of code is not working. Is there a better method of replacing/removing these characters completely?
String trim = desc.replaceAll("
", "\\n");
XML to be parsed
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate 
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
occaecat cupidatat non proident, sunt in culpa qui officia deserunt 
mollit anim id est laborum.