我正在尝试向DynamoDB(Amazon Web Services)中的数据库添加一些数据。由于我想添加多行,因此创建了一个(有效,我检查过).json文件,如下所示:
{
"Table_name": {
"PutRequest": {
"profid": ["100"],
"page_url": ["www.test.nl"],
"json": ["{blabla}"]
}
}
}
当我执行以下命令时:
system(
paste0('aws dynamodb batch-write-item --request-items ', .jsonfile)
我收到以下答复:
Error parsing parameter '--request-items': Invalid JSON: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
JSON received: {
sh: 2: Table_name:: not found
sh: 3: PutRequest:: not found
sh: 4: profid:: not found
sh: 5: page_url:: not found
sh: 6: json:: not found
sh: 7: Syntax error: "}" unexpected
有人知道出什么问题了吗?以及如何解决它,这让我发疯了!