Anda di halaman 1dari 8

Serialization with JSON

Course: Pengolahan data JSON pada flutter

Program Kredensial Mikro Mahasiswa Indonesia (KMMI) 2021

🗓 Senin, 06 September 2021


🌐 via virtual (daring) Zoom Meeting
Tujuan Pembelajaran

• Peserta bisa :
• Mengolah data JSON menjadi Class Model
• Menggunakan tool pada Dart untuk mengenerate Class Model dari sebuah
data JSON

Background source
https://www.vecteezy.com/photo/1884772-minimal-office-desk-table-top-view-with-office-supply-and-coffee-cup-on-a-white-table-with-copy-space-white-color-workpla
ce-composition-flat-lay

Jurusan Ilmu Komputer – FMIPA Universitas Program Kredensial Mikro Mahasiswa Indonesia (KMMI) Tahun 2021 2
Apa itu JSON?

• JSON (Java Script Object Notation) merupakan format standard yang


digunakan dalam pengolahan data antar platform.
• Contoh data JSON :

Background source
https://www.vecteezy.com/photo/1884772-minimal-office-desk-table-top-view-with-office-supply-and-coffee-cup-on-a-white-table-with-copy-space-white-color-workpla
ce-composition-flat-lay

Jurusan Ilmu Komputer – FMIPA Universitas Program Kredensial Mikro Mahasiswa Indonesia (KMMI) Tahun 2021 3
Mengolah data JSON pada Flutter

1. Menggunakan dart builder


2. Menggunakan Plugin pada VS Code

Background source
https://www.vecteezy.com/photo/1884772-minimal-office-desk-table-top-view-with-office-supply-and-coffee-cup-on-a-white-table-with-copy-space-white-color-workpla
ce-composition-flat-lay

Jurusan Ilmu Komputer – FMIPA Universitas Program Kredensial Mikro Mahasiswa Indonesia (KMMI) Tahun 2021 4
Mengolah data JSON menggunakan Dart Builder

• Library yang digunakan :


• json_annotation: ^3.1.1
• dev_dependencies :
• build_runner: ^1.10.0
• json_serializable: ^3.5.1

• Referensi :
• https://pub.dev/packages/json_serializable

Background source
https://www.vecteezy.com/photo/1884772-minimal-office-desk-table-top-view-with-office-supply-and-coffee-cup-on-a-white-table-with-copy-space-white-color-workpla
ce-composition-flat-lay

Jurusan Ilmu Komputer – FMIPA Universitas Program Kredensial Mikro Mahasiswa Indonesia (KMMI) Tahun 2021 5
Mengolah data JSON menggunakan plugin VSCode

Cara yang disarankan


• Plugin yang digunakan :
• Dart Data Class Generator
• Referensi :
• https://github.com/bnxm/dart-data-class-generator

Background source
https://www.vecteezy.com/photo/1884772-minimal-office-desk-table-top-view-with-office-supply-and-coffee-cup-on-a-white-table-with-copy-space-white-color-workpla
ce-composition-flat-lay

Jurusan Ilmu Komputer – FMIPA Universitas Program Kredensial Mikro Mahasiswa Indonesia (KMMI) Tahun 2021 6
Penugasan

• Install Postman
• Buatlah Class Model dari response API berikut :
• https://developer.edamam.com/edamam-docs-recipe-api

Background source
https://www.vecteezy.com/photo/1884772-minimal-office-desk-table-top-view-with-office-supply-and-coffee-cup-on-a-white-table-with-copy-space-white-color-workpla
ce-composition-flat-lay

Jurusan Ilmu Komputer – FMIPA Universitas Program Kredensial Mikro Mahasiswa Indonesia (KMMI) Tahun 2021 7
TERIMA KASIH

KONTAK SAYA DI :

Ramadhan Rosihadi Perdana

ramadhanrp.developer@gmail.com

082245947379

Background source
https://www.vecteezy.com/photo/1884772-minimal-office-desk-table-top-view-with-office-supply-and-coffee-cup-on-a-white-table-with-copy-space-white-color-workpla
ce-composition-flat-lay

Jurusan Ilmu Komputer – FMIPA Universitas Program Kredensial Mikro Mahasiswa Indonesia (KMMI) Tahun 2021 8

Anda mungkin juga menyukai