Skip to content

Make ConvertTo-Json treat [AutomationNull]::Value and [NullString]::Value as $null#10957

Merged
anmenaga merged 3 commits intoPowerShell:masterfrom
daxian-dbw:json
Nov 5, 2019
Merged

Make ConvertTo-Json treat [AutomationNull]::Value and [NullString]::Value as $null#10957
anmenaga merged 3 commits intoPowerShell:masterfrom
daxian-dbw:json

Conversation

@daxian-dbw
Copy link
Copy Markdown
Member

@daxian-dbw daxian-dbw commented Oct 31, 2019

PR Summary

Fix #9231

Make ConvertTo-Json treat [AutomationNull]::Value and [NullString]::Value as $null

This is a breaking change given the fact that [AutomationNull]::Value and [NullString]::Value are deserailized into an empty object {} today and will be null after this change.
However, it's hard to believe anyone is depending on the current wrong behavior.

PR Checklist

@daxian-dbw daxian-dbw added the Breaking-Change breaking change that may affect users label Oct 31, 2019
@daxian-dbw
Copy link
Copy Markdown
Member Author

Rebased to resolve conflicts.

@daxian-dbw
Copy link
Copy Markdown
Member Author

@PoshChan Please retry static

@daxian-dbw
Copy link
Copy Markdown
Member Author

@PoshChan Please retry linux

@PoshChan
Copy link
Copy Markdown
Collaborator

PoshChan commented Nov 5, 2019

@daxian-dbw, successfully started retry of PowerShell-CI-Linux

@PoshChan
Copy link
Copy Markdown
Collaborator

PoshChan commented Nov 5, 2019

@daxian-dbw, successfully started retry of PowerShell-CI-static-analysis

@anmenaga anmenaga added this to the 7.0.0-preview.6 milestone Nov 5, 2019
@anmenaga anmenaga added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 5, 2019
@anmenaga anmenaga merged commit 518a479 into PowerShell:master Nov 5, 2019
@daxian-dbw daxian-dbw deleted the json branch November 5, 2019 23:58
@ghost
Copy link
Copy Markdown

ghost commented Nov 21, 2019

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking-Change breaking change that may affect users CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConvertTo-Json unexpectedly serializes AutomationValue.Null as an empty object, not null

4 participants