You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Placeholder for now as I follow up on some customer scenarios: it would be really nice to have a cmdlet that could validate JSON before it's used as input. I'd expect for something like this to already exist in Newtonsoft.Json.
IMHO, it's a nice-to-have for 6.0.0 depending on how we're looking with HighPriority over the next couple months. If not, we could move it out to 6.1.0 without a real problem.
Along these lines, how about a Test-Xml / Format-Xml set of cmdlets? These are implemented in PSCX in C# and could probably be ported over now that .NET Core 2 has support for XML Schema. The Test-Xml cmdlet's utility is fairly self-evident but perhaps that is less so with Format-Xml. The latter command is very handy when you have an XML file that is a single line and 4000 chars wide. :-) It is also handy when attributes are scattered about. A formatter can also put attributes on a new line. In general it makes the XML output easier to read e.g.:
Activity
[-]Test-Json cmdlet (JSON lint)[/-][+]Test-Json cmdlet (JSON lint/validator)[/+]rkeithhill commentedon Jul 11, 2017
Along these lines, how about a
Test-Xml/Format-Xmlset of cmdlets? These are implemented in PSCX in C# and could probably be ported over now that .NET Core 2 has support for XML Schema. TheTest-Xmlcmdlet's utility is fairly self-evident but perhaps that is less so withFormat-Xml. The latter command is very handy when you have an XML file that is a single line and 4000 chars wide. :-) It is also handy when attributes are scattered about. A formatter can also put attributes on a new line. In general it makes the XML output easier to read e.g.:becomes:
scotthardwick commentedon Jan 10, 2018
I would also love to see a Test-Json, Test-XML, and Format-XML as part of baseline Powershell. Looks like the Test-Json is well underway
Add Test-Json cmdlet (NJsonSchema) (#5229)
Keep uptodate (#1)
Add Test-Json cmdlet (NJsonSchema) (PowerShell#5229)