Skip to content

Instantly share code, notes, and snippets.

@andre-f-paggi
Created October 1, 2018 14:18
Show Gist options
  • Save andre-f-paggi/e09426008cbd93d499dfbf7533034e7c to your computer and use it in GitHub Desktop.
Save andre-f-paggi/e09426008cbd93d499dfbf7533034e7c to your computer and use it in GitHub Desktop.
Serialize C# object to JSON in immediate window
Newtonsoft.Json.JsonConvert.SerializeObject(myObj, Newtonsoft.Json.Formatting.None, new Newtonsoft.Json.JsonSerializerSettings(){ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment