Announcements + Celebrations
To everyone who is celebrating Eid today, I would like to say ‘Eid Mubarak’ to you and your family. Spread peace , love and harmony. Let’s make this world a better place for living :)
I am reaching 2000 Newsletter Subscribers and literally it was not possible without your support , thank you to everyone who joined me in this journey
About Today’s Newsletter Issue
Why we need JSON handlers
Famous names in JSON handling world
How to use them with code
Why We Need JSON Handlers
We have multiple formats to represent data but JSON has got the big fan following , it is extensively used for sending-receiving data in applications. It is easy to read and flexible , but to work our application properly we need something that can convert the data into forms which are easy to understand by us and compatible with our data models. That’s where JSON handlers come.
Famous Names in JSON Handling World
We have two libraries that have downloads in billions at Nuget Package Manager.
Newtonsoft.Json (3.07B Downloads)
System.Text.Json (1.01B Downloads)
I have covered first one in my LinkedIn Post , today we are going to explore System.Text.Json
which is owned by Microsoft.
How to use System.Text.Json
Install Nuget Package System.Text.Json
and use it BINGO! Let’s see simple demonstration.
It has got some nice attributes as well that can be helpful , let’s see few of them
JsonRequired Attribute
JsonPropertyName Attribute
On similar fashion it has got few more attributes as well that you can explore
JsonIgnore
JsonConverter
Whenever you’re ready , there are 3 ways I can help you
Promote yourself to 1900+ subscribers by sponsoring my newsletter (Reach me at mwaseemzakir@gmail.com)
Become a Patron and get access to 100+ .NET Questions and Answers
Download my eBook from Gumroad that contains 30 .NET Tips (850+ Download)
Congrats !
MUHAMMAD WASEEM, your content is awesome! Keep going! I feed your page at substack every single day.