URL の短縮に Google Nuget パッケージを使用したいと考えています。必要なファイルをすべて含めました
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
解決策を教えてください..ありがとう