@@ -256,7 +256,8 @@ public static string ConstructDeploymentVariableTable(Dictionary<string, Deploym
256256
257257 foreach ( KeyValuePair < string , DeploymentVariable > pair in dictionary )
258258 {
259- result . AppendFormat ( rowFormat , pair . Key , pair . Value . Type , pair . Value . Value . ToString ( ) . Indent ( maxNameLength + maxTypeLength + 4 ) . Trim ( ) ) ;
259+ result . AppendFormat ( rowFormat , pair . Key , pair . Value . Type ,
260+ JsonConvert . SerializeObject ( pair . Value . Value ) . Indent ( maxNameLength + maxTypeLength + 4 ) . Trim ( ) ) ;
260261 }
261262 }
262263
@@ -317,12 +318,26 @@ private static void SetDeploymentProperties(PSDeploymentObject deploymentObject,
317318 if ( properties . Outputs != null )
318319 {
319320 Dictionary < string , DeploymentVariable > outputs = JsonConvert . DeserializeObject < Dictionary < string , DeploymentVariable > > ( properties . Outputs . ToString ( ) ) ;
321+ // Continue deserialize if the type of Value in DeploymentVariable is array
322+ outputs ? . Values . ForEach ( dv => {
323+ if ( "Array" . Equals ( dv ? . Type ) )
324+ {
325+ dv . Value = JsonConvert . DeserializeObject < object [ ] > ( dv . Value . ToString ( ) ) ;
326+ }
327+ } ) ;
320328 deploymentObject . Outputs = outputs ;
321329 }
322330
323331 if ( properties . Parameters != null )
324332 {
325333 Dictionary < string , DeploymentVariable > parameters = JsonConvert . DeserializeObject < Dictionary < string , DeploymentVariable > > ( properties . Parameters . ToString ( ) ) ;
334+ // Continue deserialize if the type of Value in DeploymentVariable is array
335+ parameters ? . Values . ForEach ( dv => {
336+ if ( "Array" . Equals ( dv ? . Type ) )
337+ {
338+ dv . Value = JsonConvert . DeserializeObject < object [ ] > ( dv . Value . ToString ( ) ) ;
339+ }
340+ } ) ;
326341 deploymentObject . Parameters = parameters ;
327342 }
328343
0 commit comments