String jsonString =


Download 8.83 Kb.
Sana30.04.2023
Hajmi8.83 Kb.
#1404277
Bog'liq
jsonda yangilash yoki update qilish


Update qilish


String jsonString = readJsonObjectFromSomeWhere(); try { JSONObject json = new JSONObject(jsonString); } catch (Exception e) { e.printStackTrace(); }

public void writeJSON() { JSONObject object = new JSONObject(); try { object.put("name", "Jack Hack"); object.put("score", new Integer(200)); object.put("current", new Double(152.32)); object.put("nickname", "Hacker"); } catch (JSONException e) { e.printStackTrace(); } System.out.println(object); }

 GeekLink.ru manzil.job yoki ish izlash
Download 8.83 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling