Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
        private static string SerializeJson(DataJson dataJson)
        {
            var json = JsonConvert.SerializeObject(dataJson);

            return(json);
        }