I am new on C# and also not hands on json. I want to deserialization this json data into C# objects but don't know how to deal with these guids "ae7da5d6-4024-4f7d-9221-5d2298afe650": {} in "menus" and "categories". Your help will be appreciate.
{
"menuData": {
"menus": {
"ae7da5d6-4024-4f7d-9221-5d2298afe650": {
"name": "POSIGENT-DEV",
"categoryIds": ["e6860d33-8626-4ef0-0358-08d7df7bade0"],
"fulfillmentModes": ["DELIVERY", "DINE_IN", "PICK_UP"],
"id": "ae7da5d6-4024-4f7d-9221-5d2298afe650",
"hoursData": {
"timeZone": "GMT",
"regularHours": [],
"specialHours": []
}
},
"categories": {
"e6860d33-8626-4ef0-0358-08d7df7bade0": {
"name": "Soup",
"description": "",
"itemIds": ["c30bfa7f-042f-4297-e46a-08d7df94661c"],
"id": "e6860d33-8626-4ef0-0358-08d7df7bade0"
}
}}}}
and these are my objects:
public class Menudata
{
public Menus? Menus { get; set; }
public List<Category> Categories { get; set; }
}
public class Menus
{
public string? Id { get; set; }
public string? Name { get; set; }
public string? Discription { get; set; }
public List<Category> CategoryIds { get; set; }
public FullfillmentMode FulfillmentModes { get; set; }
public List<Hoursdata> HoursData { get; set; }
}
public class Category
{
public string? Id { get; set; }
public string? Name { get; set; }
public string? Discription { get; set; }
public List<Items> ItemId { get; set; }
}