I'm creating an api using php and I'm using postman to test my requests.
in postman I choose the method of posting and in body use the raw to send a json to my api
category{
"id":"1",
"desc": "testing",
"observation": "testing",
}
it sends perfectly, but how can I recover my json on the server side? in my php
i'm using
$result = json_decode($_POST['category'], true);
but the error occurs
Notice: Undefined index: category in