I am using JObject.ToString() method to convert JSON object to string. But how can I trim output to delete spaces between tokens?
No need to resort to using Regex. Just use the Formatting.None option:
string json = jObject.ToString(Formatting.None);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With