In my android application, my JSON date is returned as this:
\/Date(1323752400000)\/
Is there a simple way to remove the escape characters? (This is being sent from a WCF service to an Android application). I am already using StringEscapeUtils.unEscapeHtml4 to decode the entire serialized object.
actully this not works as it throws java.util.regex.PatternSyntaxException instead of using that use
myJsonString=myJsonString.replaceAll("\\\\","");
it works fine
You can use Apache Commons lang:
StringEscapeUtils.unescapeJava(stringToUnEscape);
Class Ref : https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringEscapeUtils.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With