Java 解码HTML转义字符

Java 解码HTML转义字符,java,android,html,json,google-api,Java,Android,Html,Json,Google Api,我正在从Google Directions API下载JSON。HTML_指令字段表示导航所需的实际指令,其格式如下: "Head \u003cb\u003esoutheast\u003c/b\u003e on \u003cb\u003eMinor Ave\u003c/b\u003e toward \u003cb\u003eMadison St\u003c/b\u003e", 是否有一种方法可以解码/删除Java/Android应用程序中下载的字符串中的转义字符 感谢您的帮助。在Java中使用

我正在从Google Directions API下载JSON。HTML_指令字段表示导航所需的实际指令,其格式如下:

"Head \u003cb\u003esoutheast\u003c/b\u003e on \u003cb\u003eMinor Ave\u003c/b\u003e toward \u003cb\u003eMadison St\u003c/b\u003e",
是否有一种方法可以解码/删除Java/Android应用程序中下载的字符串中的转义字符

感谢您的帮助。

在Java中使用

String result = java.net.URLDecoder.decode(url, "UTF-8");
在JS中使用

document.write(decodeURIComponent(“头\u003cb\u003esoutheast\u003c/b\u003e on\u003cb\u003eMinor Ave\u003c/b\u003e朝向\u003cb\u003eMadison St\u003c/b\u003e”)
在Java使用中

String result = java.net.URLDecoder.decode(url, "UTF-8");
在JS中使用


document.write(decodeURIComponent(“Head\u003cb\u003esoutheast\u003c/b\u003e on\u003cb\u003eMinor Ave\u003c/b\u003e朝向\u003cb\u003eMadison St\u003c/b\u003e”)
这是Java中可用的方法/类,而不是Javascript吗?我应该使用URLDecover吗?oops,是的。我错过了JAVA标记,这是JAVA中可用的方法/类,不是Javascript吗?我应该使用URLDecover吗?Ooops,是的。我错过了JAVA标签