private static void DownloadJsonFile(DataJson dataJson) { var json = SerializeJson(dataJson); using (StreamWriter str = new StreamWriter("C:\\Users\\maira\\source\\repos\\DescriptJsonFile\\answer.json")) { str.Write(json); } }
private static void DownloadJsonFile(DataJson dataJson) { var json = SerializeJson(dataJson); IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication(); IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream("C:\\Users\\frodo\\source\\repos\\DescriptJsonFile\\answer.json", FileMode.Create, isoStore); using (StreamWriter str = new StreamWriter(isoStream)) { str.Write(json); } }
private static string SerializeJson(DataJson dataJson) { var json = JsonConvert.SerializeObject(dataJson); return(json); }