diff options
| author | crupest <crupest@outlook.com> | 2022-04-08 17:39:07 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-04-08 17:39:07 +0800 |
| commit | 27e1360ffe4b2f5aa7d240e1de88c5459587b489 (patch) | |
| tree | 29c7ebd95d0eb9896766f72930dbad3fa83db7c9 /BackEnd/Timeline.Tests/Helpers | |
| parent | cfc3f74d583d1c2eff634459d57a26647d212a5a (diff) | |
| download | timeline-27e1360ffe4b2f5aa7d240e1de88c5459587b489.tar.gz timeline-27e1360ffe4b2f5aa7d240e1de88c5459587b489.tar.bz2 timeline-27e1360ffe4b2f5aa7d240e1de88c5459587b489.zip | |
...
Diffstat (limited to 'BackEnd/Timeline.Tests/Helpers')
| -rw-r--r-- | BackEnd/Timeline.Tests/Helpers/CommonJsonSerializeOptions.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/Helpers/CommonJsonSerializeOptions.cs b/BackEnd/Timeline.Tests/Helpers/CommonJsonSerializeOptions.cs new file mode 100644 index 00000000..a7d6d01f --- /dev/null +++ b/BackEnd/Timeline.Tests/Helpers/CommonJsonSerializeOptions.cs @@ -0,0 +1,21 @@ +using System.Text.Json;
+using System.Text.Json.Serialization;
+using Timeline.Models.Converters;
+
+namespace Timeline.Tests.Helpers
+{
+ public static class CommonJsonSerializeOptions
+ {
+ public static JsonSerializerOptions Options { get; }
+
+ static CommonJsonSerializeOptions()
+ {
+ Options = new JsonSerializerOptions
+ {
+ PropertyNamingPolicy = JsonNamingPolicy.CamelCase
+ };
+ Options.Converters.Add(new JsonStringEnumConverter());
+ Options.Converters.Add(new JsonDateTimeConverter());
+ }
+ }
+}
|
