protected function response_data($result, $method, $url)
    {
        if (isset($result['$data'])) {
            if (is_array($result['$data'])) {
                return Resource::instance($result, $this);
            }
            return $result['$data'];
        }
        return null;
    }