Post

Visual Studio Tip #1 - Create a class for XML or JSON

Did you know that you can create object classes from an xml or json file?

Steps:

  1. Copy the xml or json file to the clipboard.

    Copy to clipboard

  2. Select “Edit” menu and then select “Paste Special”.

    Paste special

  3. Select “Paste XML As Classes” or “Paste JSON As Classes”.

    Result

So you have it, an auto-generated class by Visual Studio. It’s simple!!!

This post is licensed under CC BY 4.0 by the author.

Trending Tags