I'm trying to generate an indented JSON output using JSON.Net. The first code does not work
var data = new WebClient().DownloadString(url);
var json = JsonConvert.SerializeObject(data, Formatting.Indented);
However, this second code does work
var data = new WebClient().DownloadString(url);
var json = JValue.Parse(data).ToString(Formatting.Indented);
I'm a bit confused why both versions don't give the same output.