I'm trying to convert the following JSON example to a vb.net Class or just plain read the information. I can get the first parts, ID, name and objCode, but I can't parse out the parameterValues because the column names have spaces. So I can't assign a class field name as [DE:App code]. This is coming from a custom template so the field names can be called anything. I need to loop through all the parameterValues and get the name and value so I can add them to a database. The main values I need (that will always be there) are ID, DE:App Code and DE:App Alloc 1 Code.
{
"data": [
{
"ID": 43545325253,
"name": "FY1955: PAT",
"objCode": "PROJ",
"parameterValues": {
"DE:": "PS12",
"DE:Please Enter Requested": "/rss55.edu",
"DE:URL Allocation 1": "Society Scholarship",
"DE:Is this being created for other purposes?": "no",
"DE:Request Submitted by": "urser55",
"DE:Project Owner": "Admin User",
"DE:App Code": "YDAR",
"DE:App Completion Date": "2018-12-14",
"DE:App Alloc 1 Code": "SBDRC"
}
}
]
}
Does anyone have any ideas about how I can solve this? If you can provide any VB.Net example code, that would be great.
It seems that requirements have changed. They added another sub piece within the parameter which crashes my code on "DE:App Units". Here is what the JSON looks like now:
{
"data": [
{
"ID": 43545325253,
"name": "FY1955: PAT",
"objCode": "PROJ",
"parameterValues": {
"DE:": "PS12",
"DE:Please Enter Requested": "/rss55.edu",
"DE:URL Allocation 1": "Society Scholarship",
"DE:Is this being created for other purposes?": "no",
"DE:Request Submitted by": "urser55",
"DE:Project Owner": "Admin User",
"DE:App Code": "YDAR",
"DE:App Completion Date": "2018-12-14",
"DE:App Units": [
"University-Wide",
"All Colleges"
],
"DE:App 1 Long Name - 1": "Pref Univ",
"DE:Mailing Components": [
"Reply Envelope",
"Outer Envelope",
"Letter"
],
"DE:App Alloc 1 Code": "ABBRC"
}
}
]
}
How can I get it to work with this new JSON?
json...