I'm working on converting portions of XHTML to JSON objects. I finally got everything in JSON form, but some UTF-8 character codes are being printed. Example:
{
"p": {
"@class": "para-p",
"#text": "I\u2019m not on Earth."
}
}
This should be:
{
"p": {
"@class": "para-p",
"#text": "I'm not on Earth."
}
}
This is just one example of UTF-8 codes coming through. How can I got through the string and replace every instance of a UTF-8 code with the character it represents?