public JObject get(string q, int page, int pageSize) { var jss = new JavaScriptSerializer(); jss.MaxJsonLength = 500000000; string jsonNull = jss.Serialize(null); string success = jss.Serialize("true"); string message = jss.Serialize("success"); string flows = jss.Serialize(new List <Flow>()); try { flows = jss.Serialize(FlowModel.getFlow(q, page, pageSize)); } catch (Exception ex) { success = jss.Serialize("false"); message = jss.Serialize(ex.ToString()); } return(JObject.Parse("{success : " + success + ", message : " + message + ", flows : " + flows + "}")); }