From 9371c38af928f750114525e5f447ebad73446caa Mon Sep 17 00:00:00 2001 From: Jon Hawkesworth Date: Fri, 29 May 2015 14:50:08 +0100 Subject: [PATCH] Add -Compress to ConvertTo-Json calls in common powershell code --- lib/ansible/module_utils/powershell.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/powershell.ps1 b/lib/ansible/module_utils/powershell.ps1 index ee7d3ddeca..9606f47783 100644 --- a/lib/ansible/module_utils/powershell.ps1 +++ b/lib/ansible/module_utils/powershell.ps1 @@ -65,7 +65,7 @@ Function Exit-Json($obj) $obj = New-Object psobject } - echo $obj | ConvertTo-Json -Depth 99 + echo $obj | ConvertTo-Json -Compress -Depth 99 Exit } @@ -89,7 +89,7 @@ Function Fail-Json($obj, $message = $null) Set-Attr $obj "msg" $message Set-Attr $obj "failed" $true - echo $obj | ConvertTo-Json -Depth 99 + echo $obj | ConvertTo-Json -Compress -Depth 99 Exit 1 }