|
1 | 1 | using System; |
2 | 2 | using System.Collections.Generic; |
3 | | -using Newtonsoft.Json; |
| 3 | +using System.Text.Json.Serialization; |
4 | 4 |
|
5 | 5 | namespace Contentstack.Management.Core.Models.Fields |
6 | 6 | { |
7 | 7 | public class FileField : Field |
8 | 8 | { |
9 | | - [JsonProperty(propertyName: "extensions")] |
| 9 | + [JsonPropertyName("extensions")] |
10 | 10 | public List<string> Extensions { get; set; } |
11 | | - [JsonProperty(propertyName: "max")] |
| 11 | + [JsonPropertyName("max")] |
12 | 12 | public int? Maxsize { get; set; } |
13 | | - [JsonProperty(propertyName: "min")] |
| 13 | + [JsonPropertyName("min")] |
14 | 14 | public int? MinSize { get; set; } |
15 | 15 |
|
16 | 16 | } |
17 | 17 | public class ImageField : FileField |
18 | 18 | { |
19 | | - [JsonProperty(propertyName: "dimension")] |
| 19 | + [JsonPropertyName("dimension")] |
20 | 20 | public Dimension Dimensions { get; set; } |
21 | 21 | /// <summary> |
22 | 22 | /// Allows you to enter additional data about a field. Also, you can add additional values under ‘field_metadata’. |
23 | 23 | /// </summary> |
24 | | - [JsonProperty(propertyName: "field_metadata")] |
| 24 | + [JsonPropertyName("field_metadata")] |
25 | 25 | public new FileFieldMetadata FieldMetadata { get; set; } |
26 | 26 | } |
27 | 27 | public class Dimension |
28 | 28 | { |
29 | | - [JsonProperty(propertyName: "height")] |
| 29 | + [JsonPropertyName("height")] |
30 | 30 | public Dictionary<string, int?> Height { get; set; } |
31 | | - [JsonProperty(propertyName: "width")] |
| 31 | + [JsonPropertyName("width")] |
32 | 32 | public Dictionary<string, int?> Width { get; set; } |
33 | 33 | } |
34 | 34 | } |
0 commit comments