在Kotlin中解码HTML实体

时间:2018-12-14 14:59:43

标签: html json kotlin decode html-entities

如何在Kotlin中解码html实体?我尝试过

Fuel.get("...").responseJson { request, response, result ->
    println("Reponse : "+response.toString())
    //do something with response
    result.fold({
        json ->
        Log.i("json", Html.escapeHtml(json.content)) //.escapeHtml, like "fromHtml" is deprecated
    }, {
        err ->
        Log.i("error", err.toString())
    })
}

但我还是这样:

[{\"title\":\"La R\\u00e9gion responsable de l\\u2019organisation de tous vos transports interurbains\", ...

0 个答案:

没有答案