Created
October 28, 2019 11:07
-
-
Save ArthurHNL/41c62179143562cf2a9a3ec328f08c3d to your computer and use it in GitHub Desktop.
Paste this in the immediate window of VS during a debugging session of a C# project to immideatly serialize an object to JSON. For this to work, Newtonsoft.Json must be present in the current AppDomain.
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
global::System.IO.File.WriteAllText("temp.json", global::Newtonsoft.Json.JsonConvert.SerializeObject(variableName)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment