FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Support $null for convertto-json by SteveL-MSFT · Pull Request #10947 · PowerShell/PowerShell · GitHub

Support $null for convertto-json - #10947

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:null-json
Nov 1, 2019
Merged

Support $null for convertto-json#10947
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:null-json

Conversation

Steve Lee (SteveL-MSFT) commented Oct 30, 2019
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

ConvertTo-Json doesn't allow $null to be passed in even though it can be valid resulting json. Fix is to remove the check that the input is not null. NewtonSoft.Json handles it just fine.

PR Context

Fix #10942

PR Checklist

Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 31, 2019
Ilya (iSazonov) added this to the 7.0.0-preview.6 milestone Oct 31, 2019
Ilya (iSazonov) merged commit 70ab772 into PowerShell:master Nov 1, 2019
Ilya (iSazonov) changed the title support $null for convertto-json Support $null for convertto-json Nov 1, 2019

Copy link
Copy Markdown

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

Handy links:

Steve Lee (SteveL-MSFT) deleted the null-json branch June 6, 2020 02:29
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
ConvertTo-Json doesn't allow $null to be passed in even though it can be valid resulting json. Fix is to remove the check that the input is not null. NewtonSoft.Json handles it just fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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 doesn't serialize $null

2 participants


Back | FazBrowse Home | New Git URL