當前位置:編程學習大全網 - 網站源碼 - java如何從json獲取json數據

java如何從json獲取json數據

導入org . JSON . JSON array;

導入org . JSON . JSON exception;

公共類test2 {

公共靜態void main(String[] args)引發JSONException {

String str = "[{'columnid': 5,' columnname':' human history' },{'columnId':2,' column name ':' business vision ' } ";

JSONArray jsonArray = null

JSON array = new JSON array(str);

system . out . println(JSON array . getjson object(0))。get(" column name "));

}

}

需要介紹壹下json.jar

  • 上一篇:源代碼沒有布局文件。
  • 下一篇:Php數組分為多個數組?
  • copyright 2024編程學習大全網