I have an MVC WebApi app. I'm trying to do something basic - pass a string via JSON in the body. My client submits a small number of key/value parameters, and when the MVC router gets them, it begins to interpret the content of the strings.
An example JSON body is
{ "myKey":"red,yellow,brown,orange","foo":"bar" }
My MVC controller method is
public Dictionary<string, string> PostMyAction([FromBody] str1, [FromBody] str2) { }
I would expect str1 == "red,yellow,brown,orange"
but instead I get "Can't bind multiple parameters ('str1') to the request's content."
Why is it parsing the first string as a list of parameters?