This question already has an answer here:

I have a json string which I am capturing from a 3rd party API which is formatted like so:

{"id":"1", "first-name":"Bob"}

I've been using the MVC Json methods to decode these into dynamics, but I've now run into the situation above where the property name contains a hyphen. Am I forced to deserialize into a discrete object, or is there a way to access the first-name property manually?

Related posts

Recent Viewed