Skip to content

Conversation

@BethanyZhou
Copy link
Contributor

@BethanyZhou BethanyZhou commented Dec 21, 2021

Description

Continue deserializing the Value in DeploymentVariable as object array if its type is Array

Before:

PS C:\> $result.Outputs.stringstuff
Type  Value
----  -----
Array {, }

PS C:\> $result.Outputs.stringstuff.Value
None

PS C:\> $result.Outputs.stringstuff.Value.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     False    JArray                                   Newtonsoft.Json.Linq.JContainer

After:

PS C:\> $result.Outputs.stringstuff

Type  Value
----  -----
Array {1, 2}

PS C:\> $result.Outputs.stringstuff.Value
1
2

PS C:\> $result.Outputs.stringstuff.Value.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Object[]                                 System.Array

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@msJinLei msJinLei merged commit fb8295d into Azure:main Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New-AzDeployment and New-AzResourceGroupDeployment outputs string array not working

2 participants