MarkLogic:列出目录中的所有JSON,并使用元数据转换为另一种JSON格式
目录MarkLogic:列出目录中的所有JSON,并使用元数据转换为另一种JSON格式,json,marklogic,Json,Marklogic,目录/report types中有许多相同格式的JSON文件。它们看起来像FITP.json: { "reportTypeId": "FITP", "reportName": { "translations": { "*": "Fixed Income Two Pager" } }, "reportParameters": [], "outputFormats": [ {
/report types
中有许多相同格式的JSON文件。它们看起来像FITP.json
:
{
"reportTypeId": "FITP",
"reportName": {
"translations": {
"*": "Fixed Income Two Pager"
}
},
"reportParameters": [],
"outputFormats": [
{
"format": "word",
"styleSheet": "word_FITP.docx"
}
],
"body": {
// comments not allowed in JSON, but here comes so much irrelevant stuff
}
}
我想创建一个MarkLogic REST查询(最好是POST
),该查询
/report types
../LATEST/qbe?目录=/报告类型
- 或
../LATEST/search?directory=/report types
- 还是别的什么
POST
请求中)是什么样子的,它为我提供了所需的结果
{
"reportTypeId": "FITP",
"reportName": "Fixed Income Two Pager",
"outputFormats: [ "word" ],
"createdAt": "", // again invalid comment, but insert time stamp of creation here (file metadata?)
"modifiedAt": "", // same here, for modification date
}