In a PUT request scenario. Request with all the fields:
{
"firstName":"first",
"middleName":"middle",
"lastName":"last",
"location":"USA"
}
Request with missing field middleName
when I don't want to update middleName
:
{
"firstName":"first",
"lastName":"last",
"location":"USA"
}
Request with field middleName
set to null when I want to update middleName
to null
:
{
"firstName":"first",
"middleName":null,
"lastName":"last",
"location":"USA"
}
How do I identify which field has been set to null
and which has not been passed in the request at all.