I have a C# program that adds properties to a JObject but when I convert to string, it has \r and \n characters in the output. I'm using a very simple example with only the name and value:
JObject jo = new JObject();
jo.Add("role", "user");
jo.ToString() //Output is: "{\r\n \"role\": \"user\"\r\n}"
However if I do the following:
jo["role"].ToString() // output is: "user"
So, how do I stop it from adding the /r/n when converting to string?
Just after I posted the question, I found this so I thought I'd post in case anyone else has the problem.