【发布时间】:2013-03-24 07:03:51
【问题描述】:
我有一个存储在 JSON 中的项目列表。目前,BigQuery 似乎不支持 JSON 数组。我有以下 JSON:
[
{
"purchaseId": "f7c67e39-5382-4d08-a308-0e4657143c44",
"platform": "googleplay",
"createdAt": 1364226047214,
"type": "currency",
"purchaseDate": 1364225968000,
"updatedAt": 1364226052634
},
{
"purchaseId": "f7c67e39-5382-4d08-a308-0e4657143c44",
"platform": "googleplay",
"createdAt": 1364226047214,
"type": "currency",
"purchaseDate": 1364225968000,
"updatedAt": 1364226052634
},
{
"purchaseId": "f7c67e39-5382-4d08-a308-0e4657143c44",
"platform": "googleplay",
"createdAt": 1364226047214,
"type": "currency",
"purchaseDate": 1364225968000,
"updatedAt": 1364226052634
}
]
我收到以下错误:
Line:1 / Column:1, Expected '{' found '['
以下内容将是无效的 JSON:
{
"purchaseId": "f7c67e39-5382-4d08-a308-0e4657143c44",
"platform": "googleplay",
"createdAt": 1364226047214,
"type": "currency",
"purchaseDate": 1364225968000,
"updatedAt": 1364226052634
},
{
"purchaseId": "f7c67e39-5382-4d08-a308-0e4657143c44",
"platform": "googleplay",
"createdAt": 1364226047214,
"type": "currency",
"purchaseDate": 1364225968000,
"updatedAt": 1364226052634
}
那么,对 JSON 中的项目进行分组以便 BigQuery 轻松使用的最佳方式是什么?
【问题讨论】:
标签: json google-app-engine google-bigquery google-cloud-storage