【发布时间】:2015-09-08 20:17:12
【问题描述】:
我有一个 URL,例如 www.example.com/movies/,它有以下 JSON 数组:
[
{
"id": "alice",
"director": "Tim Burton",
"year": "2010",
"image":"alice",
"length": "108 min",
"stars": "Mia Wasikowska, Johnny Depp, Helena Bonham Carter",
"name": "Alice in Wonderland",
"description": "Nineteen-year-old Alice returns to the magical world from her childhood adventure, where she reunites with her old friends and learns of her true destiny: to end the Red Queen's reign of terror.",
"rating": "6.5",
"url": "http:\/\/ia.media-imdb.com\/images\/M\/MV5BMTMwNjAxMTc0Nl5BMl5BanBnXkFtZTcwODc3ODk5Mg@@._V1_SY317_CR0,0,214,317_AL_"
},
{
"id": "avator",
"director": "Cameron",
"year": "2009",
"image":"avatar",
"length": "162 min",
"stars": "Sam Worthington, Zoe Saldana, Sigourney Weaver",
"name": "Avatar",
"description": "A paraplegic Marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.",
"rating": "7.9",
"url": "http:\/\/ia.media-imdb.com\/images\/M\/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SY317_CR0,0,214,317_AL_"
}]
我想从 Android 获取这个 JSON 数组并将其转换为 Hashmap。请帮帮我。
【问题讨论】:
-
请看我的回答。
标签: java android arrays json hashmap