|
2 | 2 | using Contentstack.Utils.Converters; |
3 | 3 | using Contentstack.Utils.Interfaces; |
4 | 4 | using Contentstack.Utils.Models; |
5 | | -using Newtonsoft.Json; |
| 5 | +using System.Text.Json.Serialization; |
6 | 6 |
|
7 | 7 | namespace Contentstack.Utils.Tests.Mocks |
8 | 8 | { |
9 | | - public class GQLModel<T> where T: IEmbeddedObject |
| 9 | + public class GQLModel<T> where T : IEmbeddedObject |
10 | 10 | { |
11 | | - [Newtonsoft.Json.JsonConverter(typeof(RTEJsonConverter))] |
12 | 11 | public JsonRTENodes<T> multiplerte { get; set; } |
13 | 12 | public JsonRTENode<T> singlerte { get; set; } |
14 | 13 | } |
15 | 14 |
|
16 | | - [Newtonsoft.Json.JsonConverter(typeof(RTEJsonConverter))] |
| 15 | + [JsonConverter(typeof(PathMappedJsonConverter<EntryModel>))] |
17 | 16 | public class EntryModel : IEmbeddedEntry |
18 | 17 | { |
19 | | - [JsonProperty("system.uid")] |
| 18 | + [JsonPropertyName("system.uid")] |
20 | 19 | public string Uid |
21 | 20 | { |
22 | 21 | get; |
23 | 22 | set; |
24 | 23 | } |
25 | | - [JsonProperty("system.content_type_uid")] |
| 24 | + [JsonPropertyName("system.content_type_uid")] |
26 | 25 | public string ContentTypeUid |
27 | 26 | { |
28 | 27 | get; |
29 | 28 | set; |
30 | 29 | } |
31 | | - [JsonProperty("title")] |
| 30 | + [JsonPropertyName("title")] |
32 | 31 | public string Title |
33 | 32 | { |
34 | 33 | get; |
35 | 34 | set; |
36 | 35 | } |
37 | 36 | } |
38 | 37 |
|
39 | | - [Newtonsoft.Json.JsonConverter(typeof(RTEJsonConverter))] |
| 38 | + [JsonConverter(typeof(PathMappedJsonConverter<AssetModel>))] |
40 | 39 | public class AssetModel : IEmbeddedAsset |
41 | 40 | { |
42 | | - [JsonProperty("system.uid")] |
| 41 | + [JsonPropertyName("system.uid")] |
43 | 42 | public string Uid |
44 | 43 | { |
45 | 44 | get; |
46 | 45 | set; |
47 | 46 | } |
48 | | - [JsonProperty("system.content_type_uid")] |
| 47 | + [JsonPropertyName("system.content_type_uid")] |
49 | 48 | public string ContentTypeUid |
50 | 49 | { |
51 | 50 | get; |
52 | 51 | set; |
53 | 52 | } |
54 | | - [JsonProperty("title")] |
| 53 | + [JsonPropertyName("title")] |
55 | 54 | public string Title |
56 | 55 | { |
57 | 56 | get; |
58 | 57 | set; |
59 | 58 | } |
60 | | - [JsonProperty("filename")] |
| 59 | + [JsonPropertyName("filename")] |
61 | 60 | public string FileName |
62 | 61 | { |
63 | 62 | get; |
64 | 63 | set; |
65 | 64 | } |
66 | | - [JsonProperty("url")] |
| 65 | + [JsonPropertyName("url")] |
67 | 66 | public string Url |
68 | 67 | { |
69 | 68 | get; |
70 | 69 | set; |
71 | 70 | } |
72 | 71 | } |
73 | 72 | } |
74 | | - |
0 commit comments