Answer the question
In order to leave comments, you need to log in
Object not reading data from json file?
In the picture, the whole point and the problem, where did I mess it up?
namespace RSSConsole
{
public class RssLinks
{
public string name { get; set; }
public string age { get; set; }
public string[] cars { get; set; }
}
}
namespace RSSConsole
{
class Program
{
static void Main(string[] args)
{
var obj = JsonConvert.DeserializeObject<RssLinks>(File.ReadAllText("Person.json"));
Console.ReadKey();
}
}
}
{
"name": "John",
"age": 30,
"cars": ["Ford", "Mazda"]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question