public function getJsonBody() : array
    {
        $json = json_decode($this->getRawBody(), true);

        if ($json === null) {
            throw new RuntimeException('Body could not be decoded as JSON');
        }

        return $json;
    }
public function getJsonBody() : array
    {
        $json = json_decode($this->getRawBody(), true);

        if ($json === null) {
            throw new RuntimeException('Body could not be decoded as JSON');
        }

        return $json;
    }
public function getJsonBody ( ) : array { $ json = json_decode ( $ this -> getRawBody ( ) , true ) ; if ( $ json === null ) { throw new RuntimeException ( 'Body could not be decoded as JSON' ) ; } return $ json ; }
Gets the raw body as a JSON array

@return array The JSON-decoded body
@throws RuntimeException Thrown if the body could not be decoded
Gets the raw body as a JSON array