repository - jfrog 工件“对象键:值对后的无效字符'”'
问题描述
因此,我在工件中有此规范文件,以删除多个存储库(本例中为 3 个)中超过 3 个月的文件夹(其中包含工件)。
{
"files": [{
"aql": {
"items.find": {
"$or": [{
"$and": [{
"repo": "repo1",
"path": "com/domain/repo1",
"created": {
"$before": "3mo"
}
"type": "folder",
"name": {"$match":"20*"}
}],
"$and": [{
"repo": "repo2",
"path": "com/domain/repo2",
"created": {
"$before": "3mo"
}
"type": "folder",
"name": {"$match":"20*"}
}],
"$and": [{
"repo": "repo3",
"path": "com/domain/repo3",
"created": {
"$before": "3mo"
}
"type": "folder",
"name": {"$match":"20*"}
}]
}]
}
}
}]
}
但我得到:[错误]对象键后无效字符“”:值对
我怎么知道导致错误的 ( " ) 是什么? 不像其他语言那样描述输出,至少告诉你行号。
另一方面,如果我对单个存储库使用以下规范,它就像一个魅力。谢谢你!
{
"files": [{
"aql": {
"items.find": {
"repo": "repo5",
"path": "com/domain/repo5",
"created": {
"$before": "3mo"
},
"type":"folder",
"name": {"$match":"20*"}
}
}
}]}
解决方案
在所有“创建的”键/值对之后,您都缺少逗号:
"created": {
"$before": "3mo"
} <-- missing a comma here
"type": "folder",
请注意,您的工作示例在正确的位置有逗号。
推荐阅读
- json - Flutter - 将“\x”编码的 utf-8 字符转换为来自 http.get 响应的可读字符串
- mongodb - MongoDB - 紧凑型不回收 freeStorageSize 给操作系统
- ios - 来自 AVSampleBufferDisplayLayer 的画中画未加载
- angular - 如何删除 PrimeNG Angular 中“frozenbody”下方的额外空间?
- javascript - 为什么我的 Bootstrap 轮播只移动一次?
- angular - 如何在Angular中禁用已选择的下拉值
- python - Alpha Vantage 扩展盘中数据
- isabelle - Isabelle/HOL 与 HOL-Z 和 ZETA
- javascript - 如何将数据表中的多个值导出到用逗号分隔的excel(使用HTML、JQuery、JSON)
- java - 如何根据文本所在的背景更改文本的前景色?