Pertanyaan Terbaru Tentang Codable

1
Menjawab

Mencoba mendekode data dari video populer Youtube Api dengan cepat mendapatkan"Diharapkan mendekode Larik <Any> tetapi menemukan kamus sebagai gantinya"

Saya baru mengenal swift, dan saya sedang belajar mengurai data dari Api ke Aplikasi Swift saya. Saya mencoba mendapatkan data dari Youtube APi dari video Populer: (https://developers.google.com/youtube/v3/docs/videos/list) tetapi saya tidak bisa mendapatkan datanya, tidak tahu di mana kesalahan saya. Tapi itu memberikan"Diharapkan untuk mendekode Array tetapi sebaliknya menemukan kamus."

codable ios swift json

1
Menjawab

cara membuat struktur yang dapat dikodekan untuk data API berikut

{ "status": true, "error": false, "data": [ { "type": 0, "title":"", "description":"", "data": [ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null }, { "images":"/media/banner/Grocery/Grocery_m341Az6.jpg", "is_external": false, "link": null, "product_id": null, "offer_list_id": 1, "product_list_id": null } ] }, { "type": 1, "title":"Categories", "description":"", "data": [ { "category_name":"Beverages", "category_id": 5, "category_icon":"/media/category_icon_upload_location/61ho157I07L._SX522__WpWCZ7h.jpg" }, { "category_name":"Tea & Coffee", "category_id": 6, "category_icon":"/media/category_icon_upload_location/Lipton-Green-Tea-Bags-250-SDL859816919-1-31762.jpg" }, { "category_name":"Body Care", "category_id": 3, "category_icon":"/media/category_icon_upload_location/nourishing-body-lotion-100ml_1024x1024.png" }, { "category_name":"Personal Hygiene", "category_id": 7, "category_icon":"/media/category_icon_upload_location/lif0259_2_1.jpg" }, { "category_name":"Jams & Preserves", "category_id": 32, "category_icon":"/media/category_icon_upload_location/kissan-mixed-fruit-jam-500-gm-164390973-ymzpr.jpg" }, { "category_name":"Air Fresheners", "category_id": 28, "category_icon":"/media/category_icon_upload_location/Godrej_Aer_Home_Air_Freshener_Spray_Morning_Misty_Meadows__fkCoOzL.jpg" }, { "category_name":"Chocolate", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" }, { "category_name":"Cosmetics & Makeup", "category_id": 27, "category_icon":"/media/category_icon_upload_location/81oA3GcTyRL._SL1500_.jpg" }, { "category_name":"Personal care", "category_id": 26, "category_icon":"/media/category_icon_upload_location/gillette-guard-3-card-blade-pack_rixer.png" } ] }, { "type": 2, "title":"Fresh Deals", "description":"Today's Arrival", "data": [ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 } ] }, { "type": 3, "title":"", "description":"", "data": [ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null }, { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null } ] }, { "type": 4, "title":"", "description":"", "data": [ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link": null, "product_id": null, "offer_list_id": null, "product_list_id": null } ] }, { "type": 5, "title":"Discount Range", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "discount_from": 50, "discount_to": 60 }, { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "discount_from": 40, "discount_to": 100 } ] }, { "type": 2, "title":"Top Deals", "description":"Upto 45% discount", "data": [ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 } ] }, { "type": 0, "title":"", "description":"", "data": { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null } }, { "type": 6, "title":"Suggested for you", "description":"", "data": [ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 } ] }, { "type": 0, "title":"", "description":"", "data": { "images":"/media/banner/Grocery/Grocery_m341Az6.jpg", "is_external": false, "link": null, "product_id": null, "offer_list_id": 1, "product_list_id": null } }, { "type": 7, "title":"", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Personal Care", "category_id": 1, "have_sub_category": true, "sub_categories": [ { "category_name":"Chocolate", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" }, { "category_name":"Chocolate", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" } ] } ] }, { "type": 7, "title":"", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Beauty Care", "category_id": 2, "have_sub_category": false, "sub_categories": [] } ] }, { "type": 7, "title":"", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Home Care", "category_id": 3, "have_sub_category": false, "sub_categories": [] } ] } ], "cart_items_count": 5, "total_cart_price": 30000, "is_authenticated": true, "new_notification_count": 1, "cash_back_msg":"Dummy Cash Back message" } { "status": true, "error": false, "data": [ { "type": 0, "title":"", "description":"", "data": [ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null }, { "images":"/media/banner/Grocery/Grocery_m341Az6.jpg", "is_external": false, "link": null, "product_id": null, "offer_list_id": 1, "product_list_id": null } ] }, { "type": 1, "title":"Categories", "description":"", "data": [ { "category_name":"Beverages", "category_id": 5, "category_icon":"/media/category_icon_upload_location/61ho157I07L._SX522__WpWCZ7h.jpg" }, { "category_name":"Tea & Coffee", "category_id": 6, "category_icon":"/media/category_icon_upload_location/Lipton-Green-Tea-Bags-250-SDL859816919-1-31762.jpg" }, { "category_name":"Body Care", "category_id": 3, "category_icon":"/media/category_icon_upload_location/nourishing-body-lotion-100ml_1024x1024.png" }, { "category_name":"Personal Hygiene", "category_id": 7, "category_icon":"/media/category_icon_upload_location/lif0259_2_1.jpg" }, { "category_name":"Jams & Preserves", "category_id": 32, "category_icon":"/media/category_icon_upload_location/kissan-mixed-fruit-jam-500-gm-164390973-ymzpr.jpg" }, { "category_name":"Air Fresheners", "category_id": 28, "category_icon":"/media/category_icon_upload_location/Godrej_Aer_Home_Air_Freshener_Spray_Morning_Misty_Meadows__fkCoOzL.jpg" }, { "category_name":"Chocolate", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" }, { "category_name":"Cosmetics & Makeup", "category_id": 27, "category_icon":"/media/category_icon_upload_location/81oA3GcTyRL._SL1500_.jpg" }, { "category_name":"Personal care", "category_id": 26, "category_icon":"/media/category_icon_upload_location/gillette-guard-3-card-blade-pack_rixer.png" } ] }, { "type": 2, "title":"Fresh Deals", "description":"Today's Arrival", "data": [ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 } ] }, { "type": 3, "title":"", "description":"", "data": [ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null }, { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null } ] }, { "type": 4, "title":"", "description":"", "data": [ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link": null, "product_id": null, "offer_list_id": null, "product_list_id": null } ] }, { "type": 5, "title":"Discount Range", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "discount_from": 50, "discount_to": 60 }, { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "discount_from": 40, "discount_to": 100 } ] }, { "type": 2, "title":"Top Deals", "description":"Upto 45% discount", "data": [ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 } ] }, { "type": 0, "title":"", "description":"", "data": { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": true, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null } }, { "type": 6, "title":"Suggested for you", "description":"", "data": [ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 PRICE OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": false, "cart_qty": 0 } ] }, { "type": 0, "title":"", "description":"", "data": { "images":"/media/banner/Grocery/Grocery_m341Az6.jpg", "is_external": false, "link": null, "product_id": null, "offer_list_id": 1, "product_list_id": null } }, { "type": 7, "title":"", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Personal Care", "category_id": 1, "have_sub_category": true, "sub_categories": [ { "category_name":"Chocolate", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" }, { "category_name":"Chocolate", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" } ] } ] }, { "type": 7, "title":"", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Beauty Care", "category_id": 2, "have_sub_category": false, "sub_categories": [] } ] }, { "type": 7, "title":"", "description":"", "data": [ { "banner":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Home Care", "category_id": 3, "have_sub_category": false, "sub_categories": [] } ] } ], "cart_items_count": 5, "total_cart_price": 30000, "is_authenticated": true, "new_notification_count": 1, "cash_back_msg":"Dummy Cash Back message" } { "status": benar, "error": salah, "data":[ { "type": 0, "title":"", "deskripsi":"", "data":[ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": benar, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null }, { "gambar":"/media/banner/Grocery/Grocery_m341Az6.jpg", "is_external": salah, "link": null, "product_id": null, "offer_list_id": 1, "product_list_id": null } ] }, { "tipe 1, "title":"Kategori", "deskripsi":"", "data":[ { "category_name":"Minuman", "category_id": 5, "category_icon":"/media/category_icon_upload_location/61ho157I07L._SX522__WpWCZ7h.jpg" }, { "category_name":"Teh & Kopi", "category_id": 6, "category_icon":"/media/category_icon_upload_location/Lipton-Green-Tea-Bags-250-SDL859816919-1-31762.jpg" }, { "category_name":"Perawatan Tubuh", "category_id": 3, "category_icon":"/media/category_icon_upload_location/nourishing-body-lotion-100ml_1024x1024.png" }, { "category_name":"Kebersihan Pribadi", "category_id": 7, "category_icon":"/media/category_icon_upload_location/lif0259_2_1.jpg" }, { "category_name":"Jams & Preserves", "category_id": 32, "category_icon":"/media/category_icon_upload_location/kissan-mixed-fruit-jam-500-gm-164390973-ymzpr.jpg" }, { "category_name":"Penyegar Udara", "category_id": 28, "category_icon":"/media/category_icon_upload_location/Godrej_Aer_Home_Air_Freshener_Spray_Morning_Misty_Meadows__fkCoOzL.jpg" }, { "category_name":"Cokelat", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" }, { "category_name":"Kosmetik & Rias", "category_id": 27, "category_icon":"/media/category_icon_upload_location/81oA3GcTyRL._SL1500_.jpg" }, { "category_name":"Perawatan pribadi", "category_id": 26, "category_icon":"/media/category_icon_upload_location/gillette-guard-3-card-blade-pack_rixer.png" } ] }, { "type": 2, "title":"Penawaran Baru", "description":"Today's Arrival", "data":[ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 } ] }, { "type": 3, "title":"", "deskripsi":"", "data":[ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": benar,"link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null }, { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": benar, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null } ] }, { "type": 4, "title":"", "deskripsi":"", "data":[ { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": benar, "link": null, "product_id": null, "offer_list_id": null, "product_list_id": null } ] }, { "type": 5, "title":"Rentang Diskon", "deskripsi":"", "data":[ { "spanduk":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "discount_from": 50, "discount_to": 60 }, { "spanduk":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "discount_from": 40, "discount_to": 100 } ] }, { "type": 2, "title":"Penawaran Teratas", "description":"Diskon hingga 45%", "data":[ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 } ] }, { "type": 0, "title":"", "deskripsi":"", "data": { "images":"/media/banner/Glocart%20Shop/Glocart-Shop_moVB3tP.jpg", "is_external": benar, "link":"https://www.wikipedia.org/", "product_id": null, "offer_list_id": null, "product_list_id": null } }, { "type": 6, "title":"Disarankan untuk Anda", "deskripsi":"", "data":[ { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 }, { "product_id": 193, "image_url":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "product_name":"UNILEVER KSN PINEAPPLE SQH 750ML-RS.15 HARGA OFF", "offer_price": 14500, "normal_price": 15500, "is_in_cart": salah, "cart_qty": 0 } ] }, { "type": 0, "title":"", "deskripsi":"", "data": {"gambar":"/media/banner/Grocery/Grocery_m341Az6.jpg", "is_external": salah, "link": null, "product_id": null, "offer_list_id": 1, "product_list_id": null } }, { "type": 7, "title":"", "deskripsi":"", "data":[ { "spanduk":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Perawatan Pribadi", "category_id": 1, "have_sub_category": benar, "sub_categories":[ { "category_name":"Cokelat", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" }, { "category_name":"Cokelat", "category_id": 35, "category_icon":"/media/category_icon_upload_location/71p5hUVC0eL._SX569_.jpg" } ] } ] }, { "type": 7, "title":"", "deskripsi":"", "data":[ { "spanduk":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Perawatan Kecantikan", "category_id": 2, "have_sub_category": false, "sub_categories":[] } ] }, { "type": 7, "title":"", "deskripsi":"", "data":[ { "spanduk":"/media/product_images/61XJQZV8YxL._SX425_.jpg", "category_name":"Perawatan Rumah", "category_id": 3, "have_sub_category": false, "sub_categories":[] } ] } ], "cart_items_count": 5, "total_cart_price": 30000, "is_authenticated": benar, "new_notification_count": 1, "cash_back_msg":"Pesan Dummy Cash Back" } Saya telah membuatnya..tapi menunjukkan kesalahan

codable ios json swift

2
Jawaban

Decoding cepat JSON yang memiliki dua kemungkinan jenis untuk bidang yang sama [duplikat]

Pertanyaan ini sudah ada jawabannya di sini: How to deal with completely dynamic JSON responses (3 jawaban) Tutupbulan lalu. Pertanyaan ini sudah ada jawabannya di siniPertanyaan ini sudah ada jawabannya di sini: How to deal with completely dynamic JSON responses Cara menangani respons JSON yang sepenuhnya dinamis (3 jawaban) (3 jawaban) Tutupbulan lalubulan lalu. Saya menangani JSON ini menggunakan Alamofire dan Codable:

alamofire ios swift codable json

Tag Populer

© 2021   Pemrograman.Net