jfrog artifactory "invalid character '"' after object key:value pair”

jfrog artifactory "invalid character '"' after object key:value pair"

所以我在 artifactory 中有这个规范文件,用于删除多个存储库(在本例中为 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*"}                    
                    }]
                }]
            }
        }
    }]
}

但我得到:[错误] 对象 key:value 对 [=14 后的无效字符 '"' =]

我如何判断导致错误的 ()?至少告诉你行号的其他语言。

另一方面,如果我对单个存储库使用以下规范,它就像一个魅力。 谢谢!

{
"files": [{
    "aql": {
        "items.find": {
            "repo": "repo5",
            "path": "com/domain/repo5",
            "created": {
                 "$before": "3mo"
            },
            "type":"folder",
            "name": {"$match":"20*"}
        }
    }
}]}

您在所有 "created" key/value 对之后缺少一个逗号:

"created": {
   "$before": "3mo"
} <-- missing a comma here
"type": "folder",

请注意您的工作示例在正确的位置有逗号。