我有一个存储在 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 可以轻松地使用这些项目呢?