How to serialize a JObject without the formatting?
Call JObject's ToString(Formatting.None)
method.
Alternatively if you pass the object to the JsonConvert.SerializeObject method it will return the JSON without formatting.
Documentation: Write JSON text with JToken.ToString
You can also do the following;
string json = myJObject.ToString(Newtonsoft.Json.Formatting.None);