protected function decodeJSON($body)
    {
        $params = json_decode($body, true);

        if (!is_array($params) || (JSON_ERROR_NONE !== json_last_error())) {
            throw new \InvalidArgumentException('Invalid JSON data provided.');
        }

        return $params;
    }
protected function decodeJSON($body)
    {
        $params = json_decode($body, true);

        if (!is_array($params) || (JSON_ERROR_NONE !== json_last_error())) {
            throw new \InvalidArgumentException('Invalid JSON data provided.');
        }

        return $params;
    }
protected function decodeJSON ( $ body ) { $ params = json_decode ( $ body , true ) ; if ( ! is_array ( $ params ) || ( JSON_ERROR_NONE !== json_last_error ( ) ) ) { throw new \ InvalidArgumentException ( 'Invalid JSON data provided.' ) ; } return $ params ; }
Convert JSON to array with error check

@access protected
@param  string $body JSON data
@return array

@throws \InvalidArgumentException
Convert JSON to array with error check