My MVC3/.Net service is receiving some arguments as a JSONified Javascript array, and I’d like to unpack them into a C# array of strings.
Is there an existing method for doing this, or do I have to write my own?
(currently the data comes in to my controller as a single string, and looks something like this:
"[\"string1\", \"string2\", \"string3\"]"
Yes, this should happen via built in binding but without your code to see if there’s an issue, can’t comment more.
See for example:
ASP.Net MVC 3 – JSON Model binding to array
You shouldn’t require JSON.Net