路径错误Json编码数组mysql

时间:2014-08-11 08:23:18

标签: android json

我想从link

解析android中的json数组

我的数据库表有值

(5, 'Hotel Happy Times', 'Hotel Happy Times Nashik (formerly known as Was sans Inn) located next to Kalika Mandir at Gadkari Chowk is one of the best in the vicinity. Happy Times is an awesome threesome of amazing food, excellent ambience and great hospitality. T', '12', **'http://www.nikhil.webhorizons.com/img/img5.png'**)

最后一个值是我要解析的图像链接但是在json数组编码之后它将不会像我预期的那样打印正确的路径。

它会给出像这样的数组值

{"placeid":"0",

"placename":"KEBAB",

"placedescription":"Nashik is a mysterious blend of different cultures... \t",

"distance":"1",

"image":"**http:\/\/www.nikhil.webhorizons.com/\img/\img1.png**"

}

]

} 

您可以查看here

1 个答案:

答案 0 :(得分:0)

使用String.replace解析JSON时,可以从字符串中删除反斜杠:

String url = url.replace("\\", "");
相关问题