unescapeJson seems to do nothing in 1.2 - It worked correctly in commons-lang3 3.6
The unit tests in the package seem weird to me:
@Test
public void testUnescapeJson() {
final String jsonString =
"{\"age\":100,\"name\":\"kyong.com\n\",\"messages\":[\"msg 1\",\"msg 2\",\"msg 3\"]}";
assertEquals("", StringEscapeUtils.unescapeJson(""));
assertEquals(" ", StringEscapeUtils.unescapeJson(" "));
assertEquals("a:b", StringEscapeUtils.unescapeJson("a:b"));
assertEquals(jsonString, StringEscapeUtils.unescapeJson(jsonString));
}
it actually asserts that it does nothing, or am I missing something?
Is there a workaround? I thought of using unescapeJava, but not sure it would do exactly the same thing