Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
        private static string SerializeJson(DataJson dataJson)
        {
            var json = JsonConvert.SerializeObject(dataJson);

            return(json);
        }