I am able to set up an array for a class when each component in the array has a name (in this case progname
). The JSON looks like this
"document_prg":{
"data":[
{
"progname":"prog1"
}
]
},
The class is set up as follows
public Programs document_prg { get; set; }
public class Programs
{
public List<datas> data { get; set; }
public class datas
{
public string progname { get; set; }
}
}
However when the elements in the array don't have a name, I am having difficulty. In the example below, the data element is the word regional
. But it has no name. Can anyone provide some help on how to set up the class for the JSON String below:
"document_type":[
"Regional"
],