Created
July 16, 2019 22:02
-
-
Save dieseltravis/acb5c5ce6df7eadcfa21761754639e45 to your computer and use it in GitHub Desktop.
GetJson
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; | |
| //private const bool FORMAT_JSON = true; | |
| private static string GetJson(object convertToJson) | |
| { | |
| string serial = JsonConvert.SerializeObject(convertToJson, FORMAT_JSON ? Formatting.Indented : Formatting.None); | |
| return serial; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment