Advanced VB.NET Programming – Serializing Objects with JSON

preview_player
Показать описание
In this computer science programming lesson, you will what serialization is and why it is used. You’ll learn how to use VB.NET to serialize and desterilize an instance of a class via the JSON format. This can be used to save the state of an object to a file or a database, or to transmit object properties across a network. You will get the most out of this lesson if you’re an experience programmer and you are already familiar with object oriented programming, and coding classes in VB.NET.

Chapters:
00:00 Introduction
00:45 Serialization definition
01:41 The need for serialization
02:52 A simple custom object to serialize
05:05 Serialization with a BinaryFormatter (DON’T DO THIS)
09:12 WARNING about the BinaryFormatter
10:11 The JavaScript Object Notation JSON
12:17 Install Newtonsoft JSON.NET
14:05 Serialize an object to a JSON string
15:12 Serialize an object to a JSON file
16:53 Deserialize a JSON string to an object
18:40 Deserialize a JSON file to an object
19:47 Serialize properties of an object conditionally
Рекомендации по теме
Комментарии
Автор

Thanks for the lessons. Please make more videos about the advance programming

faithakanga
Автор

Bro, Dont Stop Uploading this Playlist, its really helpful, I have seen all videos from all your vb.net playlists, I want to learn more, at least tell me where i can keep learning about vb.net, any site, yt channel will be fine

rushabhbajaj
Автор

Thank you for your time in putting together these videos. They have helped tremendously! I hope to see more!

dford
Автор

Perfect! Exactly what I needed for my project. You even helped me avoid the pitfall of using the deprecated serialization methods. I was planning to do that.

I'm assuming sub-classes of objects are automatically included in the JSON serialization, so I only have to save the parent object and everything associated with it gets saved as a package. That saves a heck of a lot of trouble. The objects in my project are monstrous trees of subclasses and sub-subclasses. I'll let you know how it all works out.

kevnar
Автор

We need like this video, please continue

redouanesaadouni
Автор

Never heard of it. Now I know how and what it's used for. And with some research, I think I can implement it if I ever need to. Thanks so much for the great vids and your expertise...JT

jtlunsford
Автор

Please do more on advance topic and perhaps get into the database programming. Thanks it's a great vid.

renatzkigab
Автор

This is amazing and well executed. Very easy to understand. Thank you. . Do you have a video that explains the OOP using windows form please?

Dotto
Автор

Thank you very much Sir for all the effort you put in that channel.
I would like to ask, how the "ShouldSerializeSalary" method influences the serialization process. Who is calling that method and how it achieves the result.
I am not aware of VB.NET but rather of C#. In C# we would have some attributes to mark the property that should not get serialized. The "ShouldSerializeSalary" method looks like "magic" to me

MrJonnis
Автор

How were you able to stop it from serializing the salary by just returning either true or false with this function you made? I don't see it being used anywhere outside of the declaration. 21:10

CienaGoat
Автор

Thank you for your efforts, I learned a lot watching your tutorials.
With this one I have one problem...
The JSON file is lacking the square brackets at the beginning/end of the file and the commas between the datablocks.
I couldn´t figure out how to insert these via JsonWriter.Indentation Chars.
You might call me stupid, so please if there´s an easy solution give me a hint... 🙂
thanks!!

chrisdaum
Автор

I'm still a little lost on why you'd need serialization when you can just use StreamWriter and Reader? Is it to organize data more effeciently?

ryancameron
Автор

MsgBox("Thank you so much :)_")

mohammedal-mudhafar
Автор

Nice tutorial good Job. My Human Intelligence recognised 99% at least one clown and liar in the image.

chrislambe