0
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.
Please explain a little more... to var text no longer has json content as string, something like { obj : value } ?
– GustavoAdolfo
Hey man, this Json is weird, what does it mean ? L1od7ljenm8zhsps7ne
– Thiago Loureiro
L1od7ljenm8zhsps7ne that is the key of the json file that is generated by firebase
– Vitor Hugo
I have the data as a string, I need to transform it into a list, in this string has data of 3 users, I need to separate the data and the Keys in list to be able to work with them
– Vitor Hugo