Last active
November 17, 2017 06:35
-
-
Save syaifulnizamyahya/69a0dcfbc62795cc9db3b80636ddfef5 to your computer and use it in GitHub Desktop.
C# Print out all contents in an object
This file contains hidden or 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
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| public static string Dump(object target) | |
| { | |
| string json = JsonConvert.SerializeObject(target); | |
| JToken jt = JToken.Parse(json); | |
| return jt.ToString(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment