I am using JObject.ToString() method to convert JSON object to string. But how can I trim output to delete spaces between tokens?
Asked
Active
Viewed 1.0k times
2 Answers
19
No need to resort to using Regex. Just use the Formatting.None option:
string json = jObject.ToString(Formatting.None);
Brian Rogers
- 118,414
- 30
- 277
- 278