私はこのjson文字列を持っています:
{"work_completion_forms":
[
{
"id": "2a6aae87-af4f-4aa9-8e43-05af2be6d963",
"name": "File"
},
{
"id": "b6e35c72-026e-4ef0-8eff-36d040054a93",
"name": "Comment"
}
]
}
どうすれば解析できますか?
私はこれを試します:
Gson g = new Gson();
Parse p = g.fromJson(result, Parse.class);
String[] s = p.get_work_completion_forms();
for (int i = 0; i < s.length;i++){
Log.d(s[i], "lol");
}
public class Parse {
public String[] work_completion_forms;
public String[] get_work_completion_forms()
{
return work_completion_forms;
}
}