microsoft / PSRule

Validate infrastructure as code (IaC) and objects using PowerShell rules.
https://microsoft.github.io/PSRule/v2/
MIT License
385 stars 49 forks source link

Add JSON support for reading rules and selectors from pipeline #857

Closed ArmaanMcleod closed 2 years ago

ArmaanMcleod commented 2 years ago

Extending from #833, we can add JSON support for reading rules and selectors from pipeline. Currently they can be exported to JSON, but not read fron JSON.

We will need to create a an equivalent LanguageExpression deserializer to handle parsing if Selector expressions, which should be similar to the YAML implementation: https://github.com/microsoft/PSRule/blob/main/src/PSRule/Common/YamlConverters.cs#L611.

BernieWhite commented 2 years ago

@ArmaanMcleod Agreed.