thank you in advance for your contributions. I am passing a JSON string to a .NET controller and parsing it in a C# class. Here is my JSON..
{"CusEmail":"foo-bar@gmail.com","Name":"Foo Bar",
"Items":[{"ItemId":1234,"ItemDesc":"Item-1234"},{"ItemId":5678,"ItemDesc":"Item-5678"}]
}
Here is a snippet of my C# class defining the JSON variables (not including the nested array).
public class CreateOrderRequest
{
public string CusEmail { get; set; }
public string Name { get; set; }
}
And here is a snippet of my C# class that is parsing the JSON
public JsonResult CreateShipTo(CreateOrderRequest createOrderRequest)
{
... parsing code here
}
Currently, all of this code works but now I need to access that nested array "Items" in the JSON. How do I declare that correctly in the code above? I tried Array but that did not work.