1
I am working with firebase, and I am searching the server data with Httpwebrequest, I was able to recover this data in the following way;
{"-L1od7ljenm8zhsps7ne":{"Age":"18 years","Name":"Lecturer","Telephone":"11 970705570"},"-L1odhpkmz_1zccfpzwf":{"Age":"10 years","Name":" ","Telephone":"98294792"},"-L1odmfc92yisdg4uxpu":{"Age":"30 years","Name":"Rune","Telephone":"98294792"}}
Using this code below;
HttpWebRequest pesquisar = (HttpWebRequest)WebRequest.CreateHttp(URL);
pesquisar.ContentType = "application/json: charset=utf-8";
HttpWebResponse pesquisar1 = pesquisar.GetResponse() as HttpWebResponse;
using (Stream pesquisarStream = pesquisar1.GetResponseStream())
{
StreamReader reader = new StreamReader(pesquisarStream, Encoding.UTF8);
var text = reader.ReadToEnd();
richTextBox1.Text = text;
}
I would like to receive this data, directly in a json file and create a list so I can manipulate both the data and the Keys.
If anyone can help, thank you.
Could give an example of how to implement, it would greatly improve the response.
– Marco Souza
It’s like @Wilson did below.
– GustavoAdolfo