FromBody
should work, but your JSON is invalid: valid JSON has double quotes around keys, and double quotes around strings. Try this JSON:
{
"personId": 1,
"name": "Person1"
}
I also don't know if it will work to have
personId
in your JSON but
Id
in your Person class?