Thank you for the video. There are many JSON / C# videos out there but yours is the only one that I found that explains the usage of the JsonProperty attribute.
@CodingDroplets3 жыл бұрын
Glad to hear that!
@pushpakchintu656 Жыл бұрын
Can anyone please send me proper video.. which you have seen... Serialisation and. Deserialization with example
@teftele Жыл бұрын
Especially thanks for DateTime constructor explaining😊
@CodingDroplets Жыл бұрын
Thank you for your comment! I'm glad that you found the explanation of the DateTime constructor helpful.
@CodingDroplets3 жыл бұрын
Hello everyone! Thanks for watching this video. We have started a new tutorial series on .Net Blazor . Check it out now: kzbin.info/aero/PLzewa6pjbr3IQEUfNiK2SROQC1NuKl6PV Follow on Twitter: twitter.com/codingdroplets
@teftele Жыл бұрын
Level Up! 🎉 I adore json😅
@CodingDroplets Жыл бұрын
Thank you for your comment! I'm glad to hear that you enjoyed the tutorial and that you have an appreciation for JSON. It's a versatile and widely used data format that has become integral to modern web development.
@narennd92582 жыл бұрын
Very useful and simple example to understand easily
@CodingDroplets2 жыл бұрын
Glad you think so!
@itorres0082 жыл бұрын
Thanks for the video. It would have been useful to demonstrate reading a .JSON text file and deserializing and then serializing and writing back to a text file, instead of doing the copy/paste for the examples. Showing the reading and writing to file would teach an essential operation for this to be applied.
@CodingDroplets2 жыл бұрын
You are most welcome! Thank you for you valuable suggestion. I'm planning to do another video which explains all about JSON and I'll include reading and writing JSON content to a file as well. Once again thank you for the support.
@hemanthreddyveluri8563 Жыл бұрын
@@CodingDroplets Is that video posted? If yes, please post that video link/URL here. It would be very helpful :)
@tinashechinyati68232 жыл бұрын
This is GOLD, Thank you so much for this clear explanation. Do you have any courses I can follow to learn C#?🙂
@CodingDroplets2 жыл бұрын
Most Welcome! Thank you for your valuable feedback. All videos in our channel are for C# developers.
@roshanikolhe3870 Жыл бұрын
This was helpful
@CodingDroplets Жыл бұрын
Thank you!
@solomonmuwori19542 жыл бұрын
Thanks so much. Have a question though. How does one populate a C# class that has a One-To-Many structure and serialize. An example is an invoice having a Header and Detail lines. HEADER attributes (CustomerId, Date, InvoiceNo). DETAIL lines attributes (StockItem, Quantity, Amount). The Detail lines will be a List of items bought subordinate to the Invoice Header.
@CodingDroplets2 жыл бұрын
From the details you mentioned, I hope you need the model class structures like below. You need to create three model classes. public class Invoice { public InvoiceHeader Header { get; set; } public List Details { get; set; } } public class InvoiceHeader { public string CustomerId { get; set; } public DateTime InvoiceDate { get; set; } public string InvoiceNumber { get; set; } } public class InvoiceDetail { public string StockItem { get; set; } public decimal Quantity { get; set; } public decimal Amount { get; set; } } The InvoiceHeader and InvoiceDetail model classes are used in the main Invoice model class. So you can just create the object of Invoice model class and populate the data. Rest of the processes are same for serialization and deserialization. You can just serialize the Invoice model class object to generate JSON string. Same JSON string can be deserialized back to Invoice model class object.
@solomonmuwori19542 жыл бұрын
@@CodingDroplets Thanks very much for being responsive. What I am looking for is a loop in C# that will load data into the InvoiceDetail so I can serialize the Invoice which is the composite object.
@CodingDroplets2 жыл бұрын
Most welcome! As you told, you can loop through the items to populate InvoiceDetail list. Please refer the below video links. You can achieve it using Lambda expressions. kzbin.info/www/bejne/fpOoYWp-oMSbb9U Also you can make use of normal for loops. kzbin.info/www/bejne/jYbXhGRqfdKXiq8
@solomonmuwori19542 жыл бұрын
Thanks very much
@CodingDroplets2 жыл бұрын
Most welcome!
@chris5947 Жыл бұрын
Thank you for this tutorial, very well explained.
@CodingDroplets Жыл бұрын
Glad it was helpful!
@aJ-4T7 Жыл бұрын
How would you display deserialised objects for readability
@CodingDroplets Жыл бұрын
Thank you for your question! How you choose to display deserialized objects depends on the context and requirements of your application. If you need to display the data in JSON format, you can simply serialize the object back to a JSON string with formatting for readability.
@aJ-4T7 Жыл бұрын
I have a heavily nested object- 4 levels deep. I want to display it in a readable format. I also want the ability to export it to a .csv
@kausainshaikh1999 Жыл бұрын
How to add/delete buttons using JSON file in UI ?
@onlysimran3 жыл бұрын
After getting json data in object, how can we iterate over it and find particular value
@CodingDroplets3 жыл бұрын
Are you deserializing to array/list of objects? If yes, you can use normal for loops to iterate.
@sundarraaj29442 жыл бұрын
How to do serialisation for complex nested JSON?
@CodingDroplets2 жыл бұрын
I hope you are having arrays or lists in your model class. You can serialize using the same 'JsonConvert.Serialize' method. Can you share your model class content?
@sundarraaj29442 жыл бұрын
s I have an array and a nested array .
@CodingDroplets2 жыл бұрын
You can serialize using the same 'JsonConvert.Serialize' method as explained in the video. Please let me know if you find any difficulties.
@APB-r7k2 жыл бұрын
Dude the whole point of doing serialization and deserialization is to create a jsob text file and you didn't do that
@CodingDroplets Жыл бұрын
Sorry for that. Once the serialization is done, we can just use System.IO.File.WriteAllText method to write to a file.
@pushpakchintu656 Жыл бұрын
Can anyone please send me proper video.. which you have seen... Serialisation and. Deserialization with example