{"result":1,"message":"Client app loaded","extras":{"jobs":{"5":{"jobName":"Ford Otomobil Afi\şi","jobMaxIdleTime":"2060","jobMaxTime":"2040"}},"customers":{"8":"Seker LTD"}}}
public class Extras
{
public string loginID { get; set; }
public string loginToken { get; set; }
public string employeesNameSurname { get; set; }
public string employeesLanguage { get; set; }
public Dictionary<string, string> jobs { get; set; }
public Dictionary<string, string> customers { get; set; }
}
public class Dict
{
public int result { get; set; }
public string message { get; set; }
public Extras extras { get; set; }
}
public Dictionary jobs { get; set; } // ERROR
I can not get data from "Jobs"
There is a similar post regarding this. See if this is of any help to you.
using System;
using Newtonsoft.Json;
namespace {
[Serializable]
class {
public int Result;
public string Message;
public Extras Extras;
//Empty Constructor
public (){}
public string Serialize()
{
return JsonConvert.SerializeObject(this);
}
public static FromJson(string json)
{
return JsonConvert.DeserializeObject<>(json);
}
}
[Serializable]
class 5 {
public string JobName;
public string JobMaxIdleTime;
public string JobMaxTime;
//Empty Constructor
public 5(){}
}
[Serializable]
class Jobs {
public 5 5;
//Empty Constructor
public Jobs(){}
}
[Serializable]
class Customers {
public string 8;
//Empty Constructor
public Customers(){}
}
[Serializable]
class Extras {
public Jobs Jobs;
public Customers Customers;
//Empty Constructor
public Extras(){}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.