import org.json.JSONArray;import org.json.JSONObject;public class JSONTest{ public static void main(String[] args){ //JSONObject String jsonMessage = "{/"語文/":/"88/",/"數學/":/"78/",/"計算機/":/"99/"}"; String value1 = null; try{ //將字符串轉換成jsonObject對象 JSONObject myJsonObject = new JSONObject(jsonMessage); //獲取對應的值 value1 = myJsonObject.getString("數學"); } catch (JSONException e){ System.out.
新聞熱點
疑難解答