我想使用 Google Nuget 包来缩短 URL。我包括了所有必需的文件
public string shortenIt(string url)
{
UrlshortenerService service = new UrlshortenerService(new BaseClientService.Initializer()
{
ApiKey = "*************************",
ApplicationName = "***************",
});
Url response = service.Url.Insert(new Url { LongUrl = url }).Execute();
return response.Id;
}
我收到以下错误
Url response = service.Url.Insert(new Url { LongUrl = url }).Execute();
错误:
JsonReaderException: Error parsing NaN value. Path '', line 1, position 1
我很想知道解决方案..谢谢