How to create Model class from Json or XML file ?


While working on asp.net core project, so many time we will get scenario to create the model class from Json or Xml file. But in visual studio 2019/2017/2015 there is option to quickly generate the model class from Json or Xml file. It is very handy tips, while working with visual studio

Step to use this feature
1. Create the Class file
2. Go to Edit > Paste Sepcial > Paste JSON As Classes or Paste XML As Class in Class file.

Tips and Tricks of visual studio

I hope it will help to become more productive while working with visual studio.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.