以 JSON 格式產生報表。
設定範例
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json",
"plugins": [
{
"name": "JsonReporter",
"enabled": true,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll"
}
]
}
組態屬性
None
備註
JsonReporter 會在你停止錄影時,為每個報告外掛產生的報告寫一個檔案。 檔案名稱為 <ReportingPlugin>_JsonReporter<extension>。 大多數報告都是嚴格的 .json JSON 擴充功能,但有些報告使用不同的擴充功能和格式:
| 外掛程式 | 檔案名稱 | Format |
|---|---|---|
| UrlDiscoveryPlugin | UrlDiscoveryPlugin_JsonReporter.jsonc |
帶有註解的 JSON (JSONC) |
| 其他所有插件 |
<ReportingPlugin>_JsonReporter.json例如 ExecutionSummaryPlugin_JsonReporter.json |
JSON |
當你用腳本或工具處理報告時,請同時匹配兩個副檔名(例如 *_JsonReporter.json*),並使用支援檔案註解 .jsonc 的解析器。
JsonReporter 會將報告檔案寫入目前的工作目錄,也就是你啟動 Dev Proxy 的資料夾。
如果已有該名稱的檔案存在,JsonReporter 不會覆蓋它。 相反地,它會在檔名後加上格式中的時間戳 yyyyMMddHHmmss 記,例如 ExecutionSummaryPlugin_JsonReporter_20261105103000.json。
欲了解更多資訊,請參閱 「記錄與匯出代理活動」。