Swift JSON Parsing: Encoding and Decoding with Codable

Learn how to model, decode, and encode complex JSON data in Swift to build robust, data-driven iOS applications using modern Codable APIs and async network requests.

4.3 (552) ⏱ 1 ชม. 37 นาที 📚 3 บทเรียน 🎧 เวอร์ชันเสียง

เกี่ยวกับคอร์สนี้

Every modern iOS application relies on data from the web, which is almost always delivered in JSON format. Understanding how to seamlessly convert this data into Swift models is a foundational skill for any aspiring mobile developer. This text-based course guides you through the process of parsing JSON using Swift's powerful native APIs. You will transition from manual, error-prone parsing techniques to writing clean, type-safe Swift code that handles complex nested structures, custom keys, and dynamic API responses with ease. What you'll learn: - Understand the core concepts of serialization, encoding, and decoding in Swift. - Map complex and nested JSON structures to clean Swift data models using the Codable protocol. - Configure custom key mappings using CodingKeys to handle mismatched API naming conventions. - Handle decoding errors gracefully using robust try-catch blocks and modern Swift error handling. - Integrate JSON parsing with modern Swift concurrency (async/await) to fetch and decode network data. - Parse dynamic and heterogeneous JSON arrays safely without crashing your application. You will begin by exploring fundamental serialization concepts before progressing through step-by-step written explanations of real-world JSON structures. Each conceptual lesson is paired with practical Swift code snippets designed to reinforce your understanding through reading and analysis. This course is designed for beginner Swift developers and iOS hobbyists who want to connect their apps to external web APIs. No prior experience with network programming or JSON is required. Start reading today to build the skills needed to connect your Swift applications to the rest of the digital world.

สิ่งที่คุณจะได้รับ

  • 📜 ใบประกาศนียบัตร
    เพิ่มในโปรไฟล์ LinkedIn ของคุณ
  • 🎧 รวมเวอร์ชันเสียง
    เรียนได้ทุกที่ ไม่ต้องดูจอ
  • ♾️ เข้าถึงตลอดชีพ
    กลับมาเรียนได้ตลอด ไม่มีหมดอายุ
  • 📱 โทรศัพท์หรือคอมพิวเตอร์
    ใช้งานได้ทุกที่ ทุกอุปกรณ์
  • 💸 คืนเงิน 30 วัน
    ไม่ต้องอธิบาย
  • กระชับและตรงประเด็น
    1 ชม. 37 นาที เนื้อหาเชิงปฏิบัติ

รีวิว (5)

عمر النقيب KW ผู้เรียนที่ยืนยันแล้ว
★ 4 · 2026-04-16T16:33:54+00:00

เนื้อหาเยี่ยมยอด! โครงสร้างสมเหตุสมผลและตามง่าย โดยเฉพาะอย่างยิ่งชอบคำอธิบายที่ชัดเจน

Thiago Lopes BR ผู้เรียนที่ยืนยันแล้ว
★ 3 · 2026-01-07T03:41:54+00:00

ชอบมาก โครงสร้างไหลลื่น การนำไปใช้จริงก็ใช้ได้ทันที เยี่ยมมาก!

نورة بنت محمد بن عبدالله آل ثاني QA ผู้เรียนที่ยืนยันแล้ว
★ 4 · 2025-04-04T23:18:54+00:00

เป็นเนื้อหาพื้นฐานที่ดีนะ ชอบการจัดโครงสร้าง แต่ก็อยากให้มีกรณีศึกษาจากโลกจริงมากกว่านี้หน่อย

منيرة بنت عبدالله بن راشد آل ثاني QA ผู้เรียนที่ยืนยันแล้ว
★ 4 · 2025-01-15T23:40:54+00:00

ประสบการณ์การเรียนรู้ที่น่าทึ่ง โครงสร้างเป็นไปอย่างตรงไปตรงมา และเนื้อหาถูกนำเสนออย่างชัดเจน แนะนำอย่างยิ่ง

Sofia Nieminen FI ผู้เรียนที่ยืนยันแล้ว
★ 5 · 2025-01-09T15:46:54+00:00

ได้เรียนรู้เยอะมาก และโครงสร้างก็ทำให้ตามได้ง่าย ชอบตัวอย่างการนำไปใช้จริงที่เขาให้มา

เขียนรีวิว

หลังจากส่ง เราจะขอให้คุณเข้าสู่ระบบ — ฉบับร่างของคุณถูกบันทึก

ผู้เรียนคนอื่นเรียน

พัฒนาแอพ iOS และโปรแกรม Swift สำหรับมือใหม่

สร้างพื้นฐานที่มั่นคงในการเขียนโปรแกรมด้วย Swift และเรียนรู้การออกแบบแอพพลิเคชัน iOS แบบทันสมัยและตอบสนองได้ตั้งแต่ต้น ผ่านการฝึกเขียนและโค้ด
★ 5.0 (6,972)
$4.99$9.99

การเขียนโปรแกรม Swift และการสร้างรายได้จากแอป iOS สำหรับผู้เริ่มต้น

เรียนรู้ไวยากรณ์ Swift ที่จำเป็นและค้นพบกลยุทธ์สมัยใหม่เพื่อสร้างรายได้จากแอป iOS ของคุณผ่านการสมัครสมาชิก โฆษณา และการซื้อภายในแอป
★ 5.0 (14)
$4.99$9.99

การสร้างแอป iOS สำหรับผู้เริ่มต้นด้วย Swift และ SwiftUI

เรียนรู้พื้นฐานของ Swift และ SwiftUI ที่ทันสมัยเพื่อพัฒนาแอปพลิเคชัน iOS ตัวแรกของคุณผ่านแบบฝึกหัดที่เป็นลายลักษณ์อักษรพร้อมคำแนะนำ
★ 4.7 (19)
$4.99$9.99

พื้นฐานของ iOS และ Swift Development

คำแนะนำขั้นตอนต่อขั้นตอนสำหรับผู้เริ่มต้นในการเรียนรู้การเขียนโปรแกรม Swift และสร้างแอพพลิเคชันมือถือที่ทำงานได้อย่างสมบูรณ์
★ 4.7 (2,255)
$4.99$9.99

คำถามที่พบบ่อย

ฉันต้องใช้อะไรในการเรียนคอร์สนี้? +

แค่โทรศัพท์หรือคอมพิวเตอร์ที่มีอินเทอร์เน็ต ไม่ต้องติดตั้งหรือใช้อุปกรณ์พิเศษ

ฉันชำระเงินอย่างไร? +

ผ่านบัตรด้วย Stripe หรือคริปโต เราไม่เก็บข้อมูลบัตร — Stripe จัดการอย่างปลอดภัย

ฉันขอคืนเงินได้ไหม? +

ใช่ — คืนเงินเต็มจำนวนใน 30 วัน ไม่ต้องอธิบาย

ฉันมีสิทธิ์เข้าถึงนานเท่าไร? +

ตลอดไป เมื่อซื้อแล้วคอร์สเป็นของคุณ กลับมาเรียนได้ตลอด

ฉันจะได้ใบประกาศนียบัตรไหม? +

ได้ เมื่อเรียนจบจะได้รับใบประกาศนียบัตรที่เพิ่มในโปรไฟล์ LinkedIn ได้

ออกแบบสำหรับผู้เรียนใน
เทคโนโลยี ดีไซน์ การเงิน การตลาด สาธารณสุข การศึกษา ธุรกิจการบริการ อุตสาหกรรม