【发布时间】:2017-05-02 13:51:18
【问题描述】:
我正在尝试使用 Google 云数据存储命令行界面来创建嵌入式实体数组。我已经弄清楚如何创建一个嵌入式实体值,如下所示:
{
"properties": {
"age": {
"integerValue": "5"
},
"height": {
"integerValue": "6"
}
}
}
以及如何创建数组值如下:
{
"values": [
{
"stringValue": "one"
},
{
"stringValue": "two"
}
]
}
但我还没有弄清楚如何将嵌入值添加到数组中。例如:
{
"values": [
{
"stringValue": "one"
},
{
"stringValue": "two"
},
{
"embeddedEntityValue": {
"properties": {
"age": {
"integerValue": "5"
},
"height": {
"integerValue": "6"
}
}
}
}
]
}
给出错误: “此数组中的一个或多个值看起来不正确。如果包含值,请确保它们是 JSON 格式的 Datastore 数组值。”
【问题讨论】: