My Json [Body] structure in postman is given below
[{
"SerialNumber": "dev1",
"CustomerId": "cust1",
"Seed": "c393d900-2f25-819f-cc83-0721357bcf10",
"BitLockerKey": null,
"bitLockerRecoveryKey": null
},
{
"SerialNumber": "dev2",
"CustomerId": "cust2",
"Seed": "c393d900-2f25-819f-cc83-0721357bcf22",
"BitLockerKey": null,
"bitLockerRecoveryKey": null
}]
My web api function is given below,
[HttpPost]
public ActionResult<string> SaveData([FromBody] string Data)
{
int result = _seedService.SeedGeneration(Data);
return result > 0 ? Ok(result) : (ActionResult<string>)UnprocessableEntity("Seed generation
Failed");
}
My question is, how to pass data as string with json array structure in postman. i got the error "JSON value could not be converted to System.string