03-02-22 08:20 PM
Add the DLL
Add the Namespace Imports
public class JSONResults {
//Class variables
private string input;
//Constructor
public JSONResults (string input){
this.input = input;
}
//Property
public DataTable Results { get
{
DataTable dt = new DataTable();
dt = JsonConvert.DeserializeObject<DataTable>(input);
return dt;
}
}
}
JSONResults results = new JSONResults(Response_Content);
Results = results.Results;
03-02-22 11:47 PM
03-02-22 11:57 PM
public class JSONResults {
// Class variables
private string input;
private JsonSerializerSettings settings = new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
MissingMemberHandling = MissingMemberHandling.Ignore
};
// Constructor
public JSONResults (string input) {
this.input = input;
}
// Property
public DataTable Results { get
{
DataTable dt = new DataTable();
dt = JsonConvert.DeserializeObject<DataTable>(input, settings);
return dt; }
}
}
04-02-22 09:30 AM
04-02-22 06:04 PM