public function getContent($asResource = false)
    {
        $content = $this->request->getContent($asResource);

        json_decode($content);

        if (json_last_error() == JSON_ERROR_NONE) {
            return json_encode(json_decode($content), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
        }

        return $content;
    }
public function getContent($asResource = false)
    {
        $content = $this->request->getContent($asResource);

        json_decode($content);

        if (json_last_error() == JSON_ERROR_NONE) {
            return json_encode(json_decode($content), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
        }

        return $content;
    }
public function getContent ( $ asResource = false ) { $ content = $ this -> request -> getContent ( $ asResource ) ; json_decode ( $ content ) ; if ( json_last_error ( ) == JSON_ERROR_NONE ) { return json_encode ( json_decode ( $ content ) , JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ; } return $ content ; }
Returns the request body content, and handles unescaping slashes for
json content.

@throws \LogicException

@param bool $asResource
If true, a resource will be returned.

@return mixed
The request body content or a resource to read the body stream.
Returns the request body content and handles unescaping slashes for json content .