首页 > 解决方案 > 防止 Azure Logic App 将 JSON 输出到单行

问题描述

我正在尝试让我的 Azure 逻辑应用程序将查询结果输出为标准 JSON 格式。

目前它将整个 JSON 输出到一行。

{"value":[{"TenantId":"","SourceSystem":"","MG":"","ManagementGroupName":"","TimeGenerated":"","Computer":"","RawData":"","ProtectionOwnerBefore_s":"","ContentIdBefore_g":"","LastModifiedDate_t":null,"ProtectionTypeBefore_s":"","TemplateIdBefore_g":"","LabelIdBeforeAction_g":"","UserJustification_s":"","LabelNameBefore_s":"","ParentLabelNameBefore_s":"","ParentLabelName_s":"","ApplicationId_s":"","RecommendedLabelId_g":"","RecommendedLabelName_s":"","ActionIdBefore_g":"","SensitivityChange_s":"","LastModifiedBy_s":"","ContentId_g":"","ProtectionTime_t":null,"ProcessVersion_s":"","DeviceId_s":"","ProcessName_g":"","ActionSource_s":"","ProtectedBeforeAction_b":null,"ProtectionType_s":"","TemplateId_g":"","IsLabelChanged_b":null,"IsProtectionChanged_b":null,"ProtectionOwner_s":"","DeviceId_g":"","AadTenantId_g":"","LabelName_s":"","UserId_s":"","MachineName_s":"","Version_s":"","Workload_s":"","ProcessName_s":"","ApplicationName_s":"","Operation_s":"","ObjectId_s":"","LabelId_g":"","Protected_b":false,"Platform_s":"","Activity_s":"","Location_s":"","ApplicationId_g":"","DataState_s":"","ProductVersion_s":"","LogId_g":"","ActionId_g":"","IPv4_s":"","InformationTypes_s":"","DiscoveredInformationTypes_s":"","InformationTypesAbove55_s":"","InformationTypesAbove65_s":"","InformationTypesAbove75_s":"","InformationTypesAbove85_s":"","InformationTypesAbove95_s":"","Type":"","_ResourceId":"","ResultStatus_s":"","ResultStatus":"","dynamicInformationTypes_s":null},{"TenantId":"","SourceSystem":"","MG":"","ManagementGroupName":"","TimeGenerated":"","Computer":"","RawData":"","ProtectionOwnerBefore_s":"","ContentIdBefore_g":"","LastModifiedDate_t":null,"ProtectionTypeBefore_s":"","TemplateIdBefore_g":"","LabelIdBeforeAction_g":"","UserJustification_s":"","LabelNameBefore_s":"","ParentLabelNameBefore_s":"","ParentLabelName_s":"","ApplicationId_s":"","RecommendedLabelId_g":"","RecommendedLabelName_s":"","ActionIdBefore_g":"","SensitivityChange_s":"","LastModifiedBy_s":"","ContentId_g":"","ProtectionTime_t":null,"ProcessVersion_s":"","DeviceId_s":"","ProcessName_g":"","ActionSource_s":"","ProtectedBeforeAction_b":null,"ProtectionType_s":"","TemplateId_g":"","IsLabelChanged_b":null,"IsProtectionChanged_b":null,"ProtectionOwner_s":"","DeviceId_g":"","AadTenantId_g":"","LabelName_s":"","UserId_s":"","MachineName_s":"","Version_s":"","Workload_s":"","ProcessName_s":"","ApplicationName_s":"","Operation_s":"","ObjectId_s":"","LabelId_g":"","Protected_b":false,"Platform_s":"","Activity_s":"","Location_s":"","ApplicationId_g":"","DataState_s":"","ProductVersion_s":"","LogId_g":"","ActionId_g":"","IPv4_s":"","InformationTypes_s":"","DiscoveredInformationTypes_s":"","InformationTypesAbove55_s":"","InformationTypesAbove65_s":"","InformationTypesAbove75_s":"","InformationTypesAbove85_s":"","InformationTypesAbove95_s":"","Type":"","_ResourceId":"","ResultStatus_s":"","ResultStatus":"","dynamicInformationTypes_s":null}]}

预期输出:

[
{
"TenantId":"",
"SourceSystem":"",
"MG":"",
"ManagementGroupName":"",
"TimeGenerated":"",
"Computer":"",
"RawData":"",
"ProtectionOwnerBefore_s":"",
"ContentIdBefore_g":"",
"LastModifiedDate_t":null,
"ProtectionTypeBefore_s":"",
"TemplateIdBefore_g":"",
"LabelIdBeforeAction_g":"",
"UserJustification_s":"",
"LabelNameBefore_s":"",
"ParentLabelNameBefore_s":"",
"ParentLabelName_s":"",
"ApplicationId_s":"",
"RecommendedLabelId_g":"",
"RecommendedLabelName_s":"",
"ActionIdBefore_g":"",
"SensitivityChange_s":"",
"LastModifiedBy_s":"",
"ContentId_g":"",
"ProtectionTime_t":null,
"ProcessVersion_s":"",
"DeviceId_s":"",
"ProcessName_g":"",
"ActionSource_s":"",
"ProtectedBeforeAction_b":null,
"ProtectionType_s":"",
"TemplateId_g":"",
"IsLabelChanged_b":null,
"IsProtectionChanged_b":null,
"ProtectionOwner_s":"",
"DeviceId_g":"",
"AadTenantId_g":"",
"LabelName_s":"",
"UserId_s":"",
"MachineName_s":"",
"Version_s":"",
"Workload_s":"",
"ProcessName_s":"",
"ApplicationName_s":"",
"Operation_s":"",
"ObjectId_s":"",
"LabelId_g":"",
"Protected_b":false,
"Platform_s":"",
"Activity_s":"",
"Location_s":"",
"ApplicationId_g":"",
"DataState_s":"",
"ProductVersion_s":"",
"LogId_g":"",
"ActionId_g":"",
"IPv4_s":"",
"InformationTypes_s":"",
"DiscoveredInformationTypes_s":"",
"InformationTypesAbove55_s":"",
"InformationTypesAbove65_s":"",
"InformationTypesAbove75_s":"",
"InformationTypesAbove85_s":"",
"InformationTypesAbove95_s":"",
"Type":"",
"_ResourceId":"",
"ResultStatus_s":"",
"ResultStatus":"",
"dynamicInformationTypes_s":null
},
{
"TenantId":"",
"SourceSystem":"",
"MG":"",
"ManagementGroupName":"",
"TimeGenerated":"",
"Computer":"",
"RawData":"",
"ProtectionOwnerBefore_s":"",
"ContentIdBefore_g":"",
"LastModifiedDate_t":null,
"ProtectionTypeBefore_s":"",
"TemplateIdBefore_g":"",
"LabelIdBeforeAction_g":"",
"UserJustification_s":"",
"LabelNameBefore_s":"",
"ParentLabelNameBefore_s":"",
"ParentLabelName_s":"",
"ApplicationId_s":"",
"RecommendedLabelId_g":"",
"RecommendedLabelName_s":"",
"ActionIdBefore_g":"",
"SensitivityChange_s":"",
"LastModifiedBy_s":"",
"ContentId_g":"",
"ProtectionTime_t":null,
"ProcessVersion_s":"",
"DeviceId_s":"",
"ProcessName_g":"",
"ActionSource_s":"",
"ProtectedBeforeAction_b":null,
"ProtectionType_s":"",
"TemplateId_g":"",
"IsLabelChanged_b":null,
"IsProtectionChanged_b":null,
"ProtectionOwner_s":"",
"DeviceId_g":"",
"AadTenantId_g":"",
"LabelName_s":"",
"UserId_s":"",
"MachineName_s":"",
"Version_s":"",
"Workload_s":"",
"ProcessName_s":"",
"ApplicationName_s":"",
"Operation_s":"",
"ObjectId_s":"",
"LabelId_g":"",
"Protected_b":false,
"Platform_s":"",
"Activity_s":"",
"Location_s":"",
"ApplicationId_g":"",
"DataState_s":"",
"ProductVersion_s":"",
"LogId_g":"",
"ActionId_g":"",
"IPv4_s":"",
"InformationTypes_s":"",
"DiscoveredInformationTypes_s":"",
"InformationTypesAbove55_s":"",
"InformationTypesAbove65_s":"",
"InformationTypesAbove75_s":"",
"InformationTypesAbove85_s":"",
"InformationTypesAbove95_s":"",
"Type":"",
"_ResourceId":"",
"ResultStatus_s":"",
"ResultStatus":"",
"dynamicInformationTypes_s":null
}
]

目前我的逻辑应用程序正在运行;运行查询并列出结果(来自日志分析工作区)、Parse JSONComposeCreate Blob

任何帮助将不胜感激 - 谢谢。

标签: jsonazureformatazure-logic-apps

解决方案



推荐阅读