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.
You're most welcome (and thanks for the idea kevnar). If you serialize an object created from a sub, sub sub class, inheritance will take care of everything for you. E.G. I created an object from an Employee class, whose parent was the Person class, I then serialized the employee object. If I had a Manager class (a type of employee), which inherited from the Employee class (a type of person), which inherited from the Person class, then I would serialize the manager object. Do let me know how it works out. :)KD
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
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
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
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
It comes down to the fact that the function has the name 'ShouldSerializeSalary', I guess that's what the JsonSerializer's Serialize method is looking out for. Love the channel BTW (subbed). Keep it coming :)KD
@@ComputerScienceLessons Oh ok I gotcha! So it's just like kind of the standard syntax to use in this scenario. It's like a function definition but not at the same time.
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!!
Good question. The simple answer is that you could. Arguably JSON serialisation is well supported (by lots of different systems and programming languages), you could also argue that it's fashionable! The format of a JSON file relates well to the structure of an object (but you could of course do something similar with a text file, or XML). If you want to store object data more permanently, you should use a database. There is a discussion of the pros and cons of serialisation here: softwareengineering.stackexchange.com/questions/191269/java-serialization-advantages-and-disadvantages-use-or-avoid :)KD
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.
You're most welcome (and thanks for the idea kevnar). If you serialize an object created from a sub, sub sub class, inheritance will take care of everything for you. E.G. I created an object from an Employee class, whose parent was the Person class, I then serialized the employee object. If I had a Manager class (a type of employee), which inherited from the Employee class (a type of person), which inherited from the Person class, then I would serialize the manager object. Do let me know how it works out. :)KD
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
I'll be doing more advance VB soon :)KD
Thanks for the lessons. Please make more videos about the advance programming
We need like this video, please continue
Please do more on advance topic and perhaps get into the database programming. Thanks it's a great vid.
I plan to. You might find my videos on developing a theatre booking system useful. :)KD
Thank you for your time in putting together these videos. They have helped tremendously! I hope to see more!
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
You are very welcome :)KD
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?
Thank you. This series of videos covers OOP in Visual Basic .NET
ruclips.net/p/PLTd6ceoshprcFCsO49h2870tVzEeFpeWk
:)KD
@@ComputerScienceLessons Thank you and God bless you 🙏🏾🙏🏾
@@ComputerScienceLessons This is one of the most helpful video I’ve ever watched . Do you do C# as well?
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
Yea. Great effort, but efforts should be made to deprecate VB.NET altogether. Horrible abomination.
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
It comes down to the fact that the function has the name 'ShouldSerializeSalary', I guess that's what the JsonSerializer's Serialize method is looking out for. Love the channel BTW (subbed). Keep it coming :)KD
@@ComputerScienceLessons Oh ok I gotcha! So it's just like kind of the standard syntax to use in this scenario. It's like a function definition but not at the same time.
Thank you so much good sir!
You are most welcome :)KD
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!!
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?
Good question. The simple answer is that you could. Arguably JSON serialisation is well supported (by lots of different systems and programming languages), you could also argue that it's fashionable! The format of a JSON file relates well to the structure of an object (but you could of course do something similar with a text file, or XML). If you want to store object data more permanently, you should use a database.
There is a discussion of the pros and cons of serialisation here:
softwareengineering.stackexchange.com/questions/191269/java-serialization-advantages-and-disadvantages-use-or-avoid
:)KD
@@ComputerScienceLessons Thank you so much! This helps a lot! Do you perhaps have a video link to a tutorial on storing information in databases?
Bravo
TY :)KD
MsgBox("Thank you so much :)_")
You are most welcome :)KD
nice
Thanks :)KD
Nice tutorial good Job. My Human Intelligence recognised 99% at least one clown and liar in the image.
:) KD