We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b8ff23 commit be3e918Copy full SHA for be3e918
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ListStandardsCompare.ps1
@@ -65,12 +65,8 @@ function Invoke-ListStandardsCompare {
65
66
if ($FieldValue -is [System.Boolean]) {
67
$FieldValue = [bool]$FieldValue
68
- } elseif ($FieldValue -like '[{*') {
69
- try {
70
- $FieldValue = ConvertFrom-Json -InputObject $FieldValue -ErrorAction SilentlyContinue
71
- } catch {
72
- $FieldValue = [string]$FieldValue
73
- }
+ } elseif (Test-Json -Json $FieldValue -ErrorAction SilentlyContinue) {
+ $FieldValue = ConvertFrom-Json -InputObject $FieldValue -ErrorAction SilentlyContinue
74
} else {
75
$FieldValue = [string]$FieldValue
76
}
0 commit comments