我们如何将从 Google Drive API 接收到的文件解析为原始上传的文件。
我上传了一个包含 List 的 json 文件,并且只接收一个包含 id 名称和元数据的 json 文件。如何从该文件中获取原始 json。
val contentStream = ByteArrayContent.fromString("application/json", notesJson)
val file: File =
googleDriveService.files().create(metadata, contentStream)
.setFields("id")
.execute()
这是我收到的
{"id":"1cX1W7x5yomyyvzRYwY","kind":"drive#file","mimeType":"application/json","name":"backup.json"}