You are dumping out the WebResponse which includes details of the content but not the actual content itself and you still need to read it using something like
using (var reader = new StreamReader(response.Content.ReadAsStream()))
{
string json = reader.ReadToEnd();
System.Text.Json.JsonDocument.Parse(json).Dump();
}
But it is more easier to use GetStringAsync(url); which does this for you - for example
using (var client = new System.Net.Http.HttpClient())
{
var url = "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json";
var json = await client.GetStringAsync(url);
System.Text.Json.JsonDocument.Parse(json).Dump();
}
I'm not sure what you mean by a "Dump richtext format" ?
If you want to be able to expand or collapse sections of the json, then, AFAIK you can't do that in the rich text output panel, but can if you output to a grid/panel, e.g.
Comments
You are dumping out the WebResponse which includes details of the content but not the actual content itself and you still need to read it using something like
But it is more easier to use
GetStringAsync(url);
which does this for you - for examplethanks, that will output json, can i output the json as a Dump richtext format?
I'm not sure what you mean by a "Dump richtext format" ?
If you want to be able to expand or collapse sections of the json, then, AFAIK you can't do that in the rich text output panel, but can if you output to a grid/panel, e.g.
System.Text.Json.JsonDocument.Parse(json).Dump(true);