Past as JSON

In today’s API economy, we are always dealing with some piece of JSON in and out. We also prefer strongly typed serialisations/deserialisations for better practices. This not only helps overall programming experience, but also abstracts DTO in a very productive way.

In this context, when it comes to productivity, I think one of the best productivity features Visual Studio offers is the following

  1. Copy some JSON from Internet etc
  2. Create a new Class
  3. Go to Edit from top menu
  4. Select Paste Special
  5. Select Paste JSON as Classes

Now you have classes and fields generated from a valid JSON snippet. Visual Studio does run a tiny validator and shows an error if JSON you are pasting is not a valid one…

Happy integrations…

Advertisement

Published by

What do you think?

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 )

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.