title: Retrieving json submitted by postman in php
body: <p>I'm creating an api using php and I'm using postman to test my requests.</p>
  
  <p>in postman I choose the method of posting and in body use the raw to send a json to my api</p>
  
  <pre><code>category{
      "id":"1",
      "desc": "testing",
      "observation": "testing",
  }
  </code></pre>
  
  <p>it sends perfectly, but how can I recover my json on the server side? in my php</p>
  
  <p>i'm using</p>
  
  <pre><code>$result = json_decode($_POST['category'], true);
  </code></pre>
  
  <p>but the error occurs</p>
  
  <pre><code> Notice: Undefined index: category in
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/gvwjZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gvwjZ.png" alt="Postman"></a></p>