📜JSON Yönetimi
JSON verilerini ayrıştırma ve parsing işlemi
🔰 Nedir?
🌍 Web sayfalarında saklanan veri formatıdır
👁️ JavaScript Object Notation
⭐ Örnek JSON Verisi
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}
🪁 Ayrıştırma İşlemi
JSONObject data = new JSONObject(responseString);
JSONArray menuItemArray = data.getJSONArray("menuitem");
JSONObject thirdItem = menuItemArray.getJSONObject(2);
String onClick = thirdItem.getString("onclick");
🔗 Faydalı Bağlantılar
Last updated
Was this helpful?