【发布时间】:2010-09-23 05:39:36
【问题描述】:
我正在将编码的 html 作为 json 响应获取,但不知道如何将其解码为普通的 html 字符串,顺便说一下,这是一个 achor 标记。
x3ca hrefx3dx22http:\/\/wordnetweb.princeton.edu\/perl\/webwn?sx3dstrandx22x3ehttp:\/\/wordnetweb.princeton.edu\/perl\/webwn?sx3dstrandx3c\/ax3e
我试过 java.net.UrlDecoder.decode 没有任何运气。
【问题讨论】:
-
那根本不是 JSON。这些声称是 JSON 的数据来自哪里?
-
这里是实际的 JSON 响应 [{"type":"text","text":"Resentment - B\x27Day 是美国 R\x26B 歌手 Beyoncé Knowles 的第二张录音室专辑,于 9 月发行2006 年 4 月,哥伦比亚唱片公司与 Music World Music 和 Sony Urban Music 合作。发行恰逢 Knowles\x27 25 岁生日。...","language":"en"},{"type":" url","text":"\x3ca href\x3d\x22http://en.wikipedia.org/wiki/Resentment_(song)\x22\x3ehttp://en.wikipedia.org/wiki/Resentment_(song)\ x3c/a\x3e","语言":"en"}]