Google apps script 应用程序脚本高级服务驱动器SDK Drive.File.get(fileId)返回格式不正确的对象

Google apps script 应用程序脚本高级服务驱动器SDK Drive.File.get(fileId)返回格式不正确的对象,google-apps-script,google-drive-api,Google Apps Script,Google Drive Api,在谷歌应用程序脚本中,我启用了高级驱动器服务 当使用此方法按id获取文件时,响应非常奇怪。它看起来像一个对象,但不可解析 前 如果我把它放在记录器中,我会得到: {parents=[{id=0BzWxtgoG46sIc0YtZlZaTGhsVjA, parentLink=https://www.googleapis.com/drive/v2/files/0BzWxtgoG46sIc0YtZlZaTGhsVjA, isRoot=false, selfLink=https://www.googlea

在谷歌应用程序脚本中,我启用了高级驱动器服务

当使用此方法按id获取文件时,响应非常奇怪。它看起来像一个对象,但不可解析

如果我把它放在记录器中,我会得到:

{parents=[{id=0BzWxtgoG46sIc0YtZlZaTGhsVjA, parentLink=https://www.googleapis.com/drive/v2/files/0BzWxtgoG46sIc0YtZlZaTGhsVjA, isRoot=false, selfLink=https://www.googleapis.com/drive/v2/files/1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE/parents/0BzWxtgoG46sIc0YtZlZaTGhsVjA, kind=drive#parentReference}], etag="sIP8ArR2PAy9qIx8FYkTpbHmKik/MTQwMTIzNzEzOTg4Mw", embedLink=https://docs.google.com/a/thinksolid.com/spreadsheets/d/1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE/htmlembed, userPermission={id=me, etag="sIP8ArR2PAy9qIx8FYkTpbHmKik/w4QxcIs4En-Mb76iujO61dBDECI", role=owner, selfLink=https://www.googleapis.com/drive/v2/files/1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE/permissions/me, type=user, kind=drive#permission}, lastViewedByMeDate=2014-05-28T00:41:59.324Z, kind=drive#file, exportLinks={application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=https://docs.google.com/spreadsheets/export?id=1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE&exportFormat=xlsx, application/pdf=https://docs.google.com/spreadsheets/export?id=1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE&exportFormat=pdf}, lastModifyingUser={isAuthenticatedUser=true, emailAddress=greg.larrenaga@thinksolid.com, permissionId=06635965192609567538, displayName=Greg Larrenaga, kind=drive#user}, version=8992, id=1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE, lastModifyingUserName=Greg Larrenaga, alternateLink=https://docs.google.com/a/thinksolid.com/spreadsheets/d/1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE/edit?usp=drivesdk, title=ThePlanningGuide - 2014-05-28T00:32:19Z, createdDate=2014-05-28T00:32:20.162Z, mimeType=application/vnd.google-apps.spreadsheet, shared=true, appDataContents=false, iconLink=https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png, writersCanShare=true, modifiedByMeDate=2014-05-28T00:32:19.883Z, labels={trashed=false, starred=false, hidden=false, restricted=false, viewed=true}, quotaBytesUsed=0, selfLink=https://www.googleapis.com/drive/v2/files/1_abRfYS-CZvKorjrWutUpRZxvIO_otTkpaZJ4R-KkwE, markedViewedByMeDate=2014-05-28T00:41:58.962Z, ownerNames=[Greg Larrenaga], modifiedDate=2014-05-28T00:32:19.883Z, editable=true, copyable=true, thumbnailLink=https://lh4.googleusercontent.com/d_Pbk26bwz2bG0Z4UlN_GQBWlSG_MFi4j18KPqMVPBCgUA6XO9TurbqkBqnSpPgF-PC1xYHbNs2MEgSEbg=s220, owners=[{isAuthenticatedUser=true, emailAddress=greg.larrenaga@thinksolid.com, permissionId=06635965192609567538, displayName=Greg Larrenaga, kind=drive#user}]}
您应该注意到
=
符号,而不是通常的
来指示键值对。 我不确定如何将其转换为可用的格式

预期的响应将是一个可用的javascript对象,或者我可以解析的有效JSON

我需要深入研究返回中的
exportLinks
对象


如果这是一个bug,我很乐意将其归档。

事实证明,您可以像POJO的一样深入研究这些对象

file.exportLinks['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']

与默认服务不同,高级服务接受并返回常规JavaScript POJO。
file.exportLinks['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']