-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Document -Path and -LiteralPath parameter in Test-Json Utility Cmdlet #9814
Copy link
Copy link
Closed
Labels
area-utilityArea - Microsoft.PowerShell.Utility moduleArea - Microsoft.PowerShell.Utility moduleissue-doc-ideaIssue - request for new contentIssue - request for new content
Milestone
Description
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new
Get-Foocmdlet" instead of "New cmdlet."
Summary
Add -Path and -LiteralPath parameter to Test-Json cmdlet. This allows the user to validate JSON from file paths, instead of just a JSON string.
Details
The new parameter sets for this cmdlet is:
Test-Json [-Json] <string> [<CommonParameters>]
Test-Json [-Json] <string> [-Schema] <string> [<CommonParameters>]
Test-Json [-Json] <string> [-SchemaFile] <string> [<CommonParameters>]
Test-Json [-Path] <string> [<CommonParameters>]
Test-Json [-Path] <string> [-Schema] <string> [<CommonParameters>]
Test-Json [-Path] <string> [-SchemaFile] <string> [<CommonParameters>]
Test-Json [-LiteralPath] <string> [<CommonParameters>]
Test-Json [-LiteralPath] <string> [-Schema] <string> [<CommonParameters>]
Test-Json [-LiteralPath] <string> [-SchemaFile] <string> [<CommonParameters>]Examples:
With -Path:
PS C:\> Test-Json -Path data.jsonWith -LiteralPath:
PS C:\> Test-Json -LiteralPath '[data].json'Articles
- reference/7.3/Microsoft.PowerShell.Utility/Test-Json.md
Related Source Pull Requests
Related Source Issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-utilityArea - Microsoft.PowerShell.Utility moduleArea - Microsoft.PowerShell.Utility moduleissue-doc-ideaIssue - request for new contentIssue - request for new content