Browse code

Merge pull request #11090 from jhawkesworth/powershell-to-json-compress

Add -Compress to ConvertTo-Json calls in common powershell code

Brian Coca authored on 2015/05/29 23:35:02
Showing 1 changed files
... ...
@@ -65,7 +65,7 @@ Function Exit-Json($obj)
65 65
         $obj = New-Object psobject
66 66
     }
67 67
 
68
-    echo $obj | ConvertTo-Json -Depth 99
68
+    echo $obj | ConvertTo-Json -Compress -Depth 99
69 69
     Exit
70 70
 }
71 71
 
... ...
@@ -89,7 +89,7 @@ Function Fail-Json($obj, $message = $null)
89 89
 
90 90
     Set-Attr $obj "msg" $message
91 91
     Set-Attr $obj "failed" $true
92
-    echo $obj | ConvertTo-Json -Depth 99
92
+    echo $obj | ConvertTo-Json -Compress -Depth 99
93 93
     Exit 1
94 94
 }
95 95