Created
April 25, 2018 22:32
-
-
Save aaryan79831014/eaec67dd3f1778c84e33e18296842959 to your computer and use it in GitHub Desktop.
Object Dumper extension using Newtonsoft Json Serializer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class ObjectHelper | |
{ | |
public static void Dump<T>(this T x) | |
{ | |
string json = Newtonsoft.Json.JsonConvert.SerializeObject(x, Formatting.Indented); | |
Console.WriteLine(json); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment