getJosnRawBody return type comfused

post with invalid json string

POST http://buluo-api.local/test
Content-Type: application/json
{"id":"1", "name":"koogua", aa}

$json = $this->request->getJsonRawBody(); // return null

   /**
     * Gets decoded JSON HTTP raw request body
     *
     * @param bool $associative 
     * @return array|bool|\stdClass 
     */
    public function getJsonRawBody($associative = false) {}

the class api return types: array|bool|\stdClass

What did you expect? This is normal behaviour. Your input json string is invalid. Phalcon internally uses PHP's json_decode , in this case it will fail to parse such invalid JSON string and you'll get null as a result i.e. nothing, since JSON is not valid.