let's say I have the following JSON payload;
{
"pagemap": {
"metatags": [
{
"msapplication-task": "name\u003dAbout Tugberk Ugurlu;action-uri\u003d/about;icon-uri\u003d/content/App_Icons/icos/about.ico",
"msapplication-task": "name\u003dContact;action-uri\u003d/contact;icon-uri\u003d/content/App_Icons/icos/contact.ico",
"msapplication-task": "name\u003dBlog RSS Feed;action-uri\u003dhttp://feeds.feedburner.com/TugberkUgurlu;icon-uri\u003d/content/App_Icons/icos/rss.ico",
"msapplication-task": "name\u003dTugberk on Twitter;action-uri\u003dhttp://twitter.com/tourismgeek;icon-uri\u003d/content/App_Icons/icos/twitter.ico",
"msapplication-starturl": "./",
"application-name": "Tugberk's Blog",
"msapplication-tooltip": "bla bla bla..."
}
]
}
}
The property names under mettags are dynamic. I mean one of them is msapplication-starturl for this request but it might be msapplication-foo for another.
So what would be the best c# classes for this kind of JSON payload?
EDIT
this is the part of JSON format which google search API gives. Also I am using Json.NET. is There any other way than dynamic?
IDictionary<JSONKey,JSONValueSuperType>(as a sequence element ofmetatags) or similar -- of course, if this dynamic nature only applies to "msapplication-" ... but why make it even more confusing? :) I'm honestly not really sure what is being asked otherwise :-/dynamic.