获取JSONArray的每个元素

时间:2019-04-05 06:55:59

标签: java json

我有一个像这样的jsonArray。我怎样才能从Java获取每个数组元素

[{"subjectname":"Health","classKey":5084485095784448,"staffKeyId":4819823842295808,"subjectKeyId":5756749483081728,"class":"8C"},{"subjectname":"Civics","classKey":5641826627223552,"staffKeyId":4549155540172800,"subjectKeyId":5563198258282496,"class":"8B"}]

1 个答案:

答案 0 :(得分:0)

只需使用Jackson JSON解析器(https://github.com/FasterXML/jackson

put