Révision 6f451cc1 GES_PAC/ViewModel/ExportDataViewModel.cs
GES_PAC/ViewModel/ExportDataViewModel.cs | ||
---|---|---|
3 | 3 |
using GES_PAC.Helpers; |
4 | 4 |
using System.Text.Json; |
5 | 5 |
using System.Collections.ObjectModel; |
6 |
using System.Text.Json.Serialization; |
|
6 | 7 |
|
7 | 8 |
|
8 | 9 |
namespace GES_PAC.ViewModel |
... | ... | |
61 | 62 |
IsBusy = true; |
62 | 63 |
var lastDay = DayList.Last(); |
63 | 64 |
string fileName = lastDay.Date.ToString(); |
64 |
string json = JsonSerializer.Serialize(lastDay); |
|
65 |
string json = JsonSerializer.Serialize(lastDay, new JsonSerializerOptions |
|
66 |
{ |
|
67 |
ReferenceHandler = ReferenceHandler.Preserve, |
|
68 |
WriteIndented = true |
|
69 |
}); |
|
65 | 70 |
AndroidFileHelper.SaveJsonToDownloads(fileName, json); |
66 | 71 |
IsBusy = false; |
67 | 72 |
#endif |
Formats disponibles : Unified diff