using System; using System.Collections.Generic; using System.Linq; using System.Web; using EHEC_Server; using System.Web.Script.Serialization; namespace EHEC_Server { public class ClusterConverter { public string WriteJson() { ClusterPatient p = new ClusterPatient(); List clusterPatientsList = new List(); clusterPatientsList = p.GetClusterPatients(); ClusterResult r = new ClusterResult(); List clusterResultsList = new List(); clusterResultsList = r.GetClusterResults(); //var json = JsonConverter.Serialize(clusterPatientsList); //string path = System.Reflection.Assembly.GetExecutingAssembly().Location; //string fileName = Path.Combine(path, "ClusterData.json"); //System.IO.File.WriteAllText(fileName, json); var json = JsonConverter.Serialize(clusterPatientsList); System.IO.File.WriteAllText(@"C:\Users\Public\Documents\cluster.json", json); return json; } private List GetCluster() { return new List(); } } }