I am trying to deserialize the following JSON file into 3 variables: manager(Class) Servers(list-class) Admins(List-Class)
Everything I've tried so far doesn't work. How should I do that?
{
"Manager":{
"ServerIp":"ServerIP",
"ServerPort":"6000"
},
"Admins":[
{
"Name":"AdminUserName",
"ID":"AdminID"
}
]
"Servers":[
{
"ServerName":"servername",
"Path":"executablepath",
"IP":"ip",
"Port":"port",
"Password":"pass"
}
]
}
public class Manager
{
public string? ServerIp { get; set; }
public string? ServerPort { get; set; }
}
public class Admins
{
public string? Name { get; set; }
public string? ID { get; set; }
}
public class Servers
{
public string? ServerName { get; set; }
public string? Path { get; set; }
public string? IP { get; set; }
public string? Port { get; set; }
public string? Password { get; set; }
}
