using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Web;
///
/// Resultset to be JSON stringified and set back to client.
///
[Serializable]
[SuppressMessage("ReSharper", "InconsistentNaming")]
public class DataTableResultSet
{
/// Array of records. Each element of the array is itself an array of columns
public List> data = new List>();
/// value of draw parameter sent by client
public int draw;
/// filtered record count
public int recordsFiltered;
/// total record count in resultset
public int recordsTotal;
public string ToJSON()
{
return JsonConvert.SerializeObject(this);
}
}
[Serializable]
[SuppressMessage("ReSharper", "InconsistentNaming")]
public class DataTableResultError : DataTableResultSet
{
public string error;
}