-5

I am facing this problem to convert this JSON File. Anybody please tell me how to deserialize this JSON file. https://fasp-ee999.firebaseio.com/Students.json?auth=yB71DWGpZeBBQjvtEvc4yeROXO8zp717W180rlzw

Above is my json file

5
  • 2
    What language are you using? Most languages have some form of "Deserialize" method that will do this job for you. Commented Sep 5, 2020 at 4:00
  • 1
    Does this answer your question? How do I get formatted JSON in .NET using C#? Commented Sep 5, 2020 at 6:48
  • No, i don't need to format I need to deserialize it Commented Sep 5, 2020 at 6:50
  • Check the answer of Edwards Link, not the question. Commented Sep 5, 2020 at 6:53
  • @jdickel I want to deserialize set of objects into a list Commented Sep 5, 2020 at 7:01

1 Answer 1

1

It looks like a dictionary, sample with .net core 3.1:

using System.Collections.Generic; using System.IO; using System.Text.Json; namespace ConsoleApp1 { public class Data { public int id { get; set; } public string name { get; set; } } class Program { public static void Main(string[] args) { var dataToDeserialize = File.ReadAllText("Students.json"); var deserializedResult = JsonSerializer.Deserialize<Dictionary<string, Data>>(dataToDeserialize); } } } 
Sign up to request clarification or add additional context in comments.

3 Comments

Bro, you helped me a lot. Thank you so much much but. I want to print those JSON objects how do I do. if I use for each statement and student.value then I am not getting the objects correctly. please help me in this situation also, please
Bro I want to download a string from the internet then I want to deserialize how can I do this

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.