Unpack serde_json and serde::Serialize for Rust
Ғылым және технология
The video does a little more than just describe how to serialize your data. It also discusses some of the error messages that you might encounter and how to a) avoid them and b) recover from them. So, if you ever get stuck with errors from serde::Serialize, this message is for you.
Programming with Rust language is often (although, less often these days!) described as difficult and confusing. This video shows you that it can be really comfortable and flexible, while being extremely quick.
Timeline
00:00:00 Intro
00:04:05 Using string formatting
00:09:02 serde_json::json macro
00:12:23 serde::Serialize trait
00:18:16 HashMap as an intermediate type
00:23:49 serde::Serialize by hand
00:25:21 Wrap up
Some of the crates discussed
- serde serde.rs/
- serde_json docs.rs/serde_json/
🦀 Rust resources:
- Tim's tutorial videos timclicks.dev
- Rust Documentation: doc.rust-lang.org/book/
- Rust Playground: play.rust-lang.org/
- Rust in Action (Tim's book!) mng.bz/4MlD
- How to Learn Rust (online course!) learning.accelerant.dev/how-t...
👋 Connect with Tim:
- Twitter: / timclicks
- GitHub: github.com/timClicks
- Mastodon: mastodon.nz/@timClicks
- DEV: dev.to/timclicks/
- Patreon (extra learning materials) / timclicks
🔔 Subscribe to the channel and click the bell icon to stay updated with the latest videos and live streams from timClicks: kzread.info?sub...
👍 Like this video if you found it helpful, and share it with your friends who are also interested in Rust programming.
Пікірлер: 19
You don't even understand how I love these mini-learning videos.
Videos are getting better and better everyday . Awesome work
These videos are great Tim! I love this so much as it helps me think about what I may want to incorporate with my next rust projects and learn at the same time. Cheers and good on ya!
@timClicks
11 ай бұрын
Thank you so much for the message, Clinton. Am delighted to hear that this has been useful for you.
Really useful!
Great video Tim! Thanks for sharing, been using serde a lot these days :)
@timClicks
11 ай бұрын
Thank you so much!
Excellent. Thank you.
ah wish I had watched your video this morning! I struggled for a solid 20 minutes earlier today until I understood I needed to import the "serde" feature 😅
@timClicks
11 ай бұрын
Oh no 😂 I'm glad that you figured it out in the end. Thanks for watching!!
Serde❤
Would it ever make sense to not use a static str for the HashMap keys? Im guessing not, but just interested to know
Thank you
@timClicks
11 ай бұрын
It's my pleasure!
@nouaimmebarki8885
11 ай бұрын
@@timClicks 😄
It seems that for a 20 minute video, it was possible to prepare an example code in advance. But I want content for experienced developers. It is also interesting to hear about tips/tools/cargo plugins, which you use in rust development.
@timClicks
11 ай бұрын
I don't understand this comment. You're speaking as though I am creating this channel specifically for you. There will be more, but I am just getting started 🙂. My channel has only been active for 2 months.
@TheInspctrcat
11 ай бұрын
This is just my opinion, and I did not claim that the channel is specifically for me. Or do you need another "useful" comment about how good you are and what a good video you made? Meh~ I just pointed out some shortcomings that, in my opinion, are easily fixed. And he announced the list of those of interest to me (as a rust developer ofc). I hope I managed to get the point of my comment. And, if the wording seemed rude to you - I apologize, I did not set such a goal.
@TheInspctrcat
11 ай бұрын
@@timClicksforgot to reply, sorry, check previous message