I\'m trying to investigate a bug in a crash dump (so I can not change the code). I have a really complicated object (thousands of lines in the serialized representation) and
Use this in Visual Studio's "Immediate" window, replacing c:\directory\file.json
with the full path to the file to which you'd like to write the JSON and myObject
with your variable to serialise:
System.IO.File.WriteAllText(@"c:\directory\file.json", Newtonsoft.Json.JsonConvert.SerializeObject(myObject))