Strange behavior during MVC Model Binding
Describe the bug
Wrong object is binded to controller action parameter when dynamic and object types are used.
To Reproduce
Steps to reproduce the behavior:
Using Asp.Net Core 2.2
[HttpPut("{pId}/Constraints")]
public async Task<IActionResult> PutConstraints([FromRoute]Guid pId, [FromBody] dynamic constraints)
{
....
}
Results with
public async Task<IActionResult> PutConstraints([FromRoute]Guid pId, [FromBody] dynamic[] constraints)
{
....
}

Whereas returns correct object

Expected behavior
dynamic needs to give same result with dynamic[] also object needs to give same result with object[]
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
.NET Core SDK (reflecting any global.json): Version: 2.2.100 Commit: b9f2fa0ca8
.NET Core SDKs installed: 2.2.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Actual JSON Object
[
{
"id":"dd877c97-7dc5-4c07-b80e-310b04d98aa2",
"type":"komisyon",
"input":{
"pk":[
"00"
],
"vadeMin":1,
"vadeMax":60
},
"output":{
"val":2
}
},
{
"id":"67ab2cda-ec00-4bea-900d-3f0736c48a71",
"type":"faiz",
"input":{
"pk":[
"00"
],
"vadeMin":1,
"vadeMax":60
},
"output":{
"val":35
}
},
{
"id":"c4fb80b4-4697-482d-b0b0-7096b6769312",
"type":"faiz",
"input":{
"pk":[
"00"
],
"vadeMin":1,
"vadeMax":60
},
"output":{
"val":1
}
}
]
Thanks for contacting us, @simonare. Can you please provide a more comprehensive example? The JSON you've shared above doesn't map with the screenshot above so it's not clear really how you envision this to work.
Hi. We're closing this issue as we have heard no response from you for some time now. If you have more details and are encountering this issue please add a new reply and re-open the issue.