- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Rust crates: custom serde deserializers (Twitch live stream 2023-02-13)
In this video, we continued our exploration of the serde and the serde-json crates. In particular, we improved our deserialization logic by adding some custom deserializers.
- Previous episode in the series: https://youtu.be/rqUH1Dnz8Ho
- Serde & Serde JSON (to parse JSON data): https://serde.rs/
The code is available here: https://github.com/lmammino/rust-lastfm
Chapters:
00:00:00 Intro & Recap from the last stream
00:03:40 Defining a custom ImageSet struct
00:06:00 Refactoring code into submodules
00:07:35 Custom deserialization function using serde deserialize_with
00:20:30 Handling missing fields with serde errors
00:29:16 Writing a test for our custom deserializer
00:31:40 Using the serde json!() macro
00:35:00 Debugging our test
00:38:00 Deserializing by implementing the Deserialize trait directly
00:41:13 Cleaning up and adding more tests
00:50:10 Adding support for now_playing field using deserialize_with
00:58:00 Using serde rename annotation
01:02:55 Testing our solution
01:03:20 Using the serde default annotation
01:05:30 Making the date field optional
01:07:10 Committing and wrapping up
Huge thanks to WGaffa & Altos__ for all the help given during this stream :)
To see the next episodes live check out our Twitch channel: https://twitch.tv/loige
Chat with me on Twitter at https://twitter.com/loige
#rust #json #serde
Видео Rust crates: custom serde deserializers (Twitch live stream 2023-02-13) канала Luciano Mammino (loige)
- Previous episode in the series: https://youtu.be/rqUH1Dnz8Ho
- Serde & Serde JSON (to parse JSON data): https://serde.rs/
The code is available here: https://github.com/lmammino/rust-lastfm
Chapters:
00:00:00 Intro & Recap from the last stream
00:03:40 Defining a custom ImageSet struct
00:06:00 Refactoring code into submodules
00:07:35 Custom deserialization function using serde deserialize_with
00:20:30 Handling missing fields with serde errors
00:29:16 Writing a test for our custom deserializer
00:31:40 Using the serde json!() macro
00:35:00 Debugging our test
00:38:00 Deserializing by implementing the Deserialize trait directly
00:41:13 Cleaning up and adding more tests
00:50:10 Adding support for now_playing field using deserialize_with
00:58:00 Using serde rename annotation
01:02:55 Testing our solution
01:03:20 Using the serde default annotation
01:05:30 Making the date field optional
01:07:10 Committing and wrapping up
Huge thanks to WGaffa & Altos__ for all the help given during this stream :)
To see the next episodes live check out our Twitch channel: https://twitch.tv/loige
Chat with me on Twitter at https://twitter.com/loige
#rust #json #serde
Видео Rust crates: custom serde deserializers (Twitch live stream 2023-02-13) канала Luciano Mammino (loige)
rust json serde deserialization custom deserializers serde-json parse JSON data code Github Intro live streaming coding live coding learning Rust programming software development JSON tech tutorials tech talks tech education tech community computer science software engineering web development data structures algorithms problem solving learning to code coding for beginners programming basics
Комментарии отсутствуют
Информация о видео
14 февраля 2023 г. 4:53:06
01:09:12
Другие видео канала





















