I have a JSON file like this:
[
{
"Id": 1,
"Size": "big",
"Order": 6
},
{
"Id": 2,
"Size": "small",
"Order": 4
},
{
"Id": 3,
"Size": "medium",
"Order": 2,
"chips": []
}
]
The chips property is an array that may or may not appear in some object (It is currently null at this point). Should I declare the class for the json file like this:
public class Settings
{
public int Id { get;}
public string Size { get;}
public int Order { get;}
public string[]? Chips { get;}
}
with the ? or something like Nullable[] for the property instead?