Sha256: d77561829e4f7a8e8c56bc37264ce452ebaeec3810d5165f6813461a2c22ecdb

Contents?: true

Size: 567 Bytes

Versions: 16

Compression:

Stored size: 567 Bytes

Contents

if (Get-Command ConvertTo-JSON -errorAction SilentlyContinue) {
    @{
        'PS1_JSON_FACT1' = 'value1'
        'ps1_json_fact2' = 2
        'ps1_json_fact3' = $True
        'ps1_json_fact4' = @('first', 'second')
        'ps1_json_fact5' = $Null
        'ps1_json_fact6' = @{ 'a' = 'b'; 'c' = 'd' }
    } | ConvertTo-JSON -Depth 1 -Compress
} else {
@'
{
    "PS1_JSON_FACT1": "value1",
    "ps1_json_fact2": 2,
    "ps1_json_fact3": true,
    "ps1_json_fact4": ["first", "second"],
    "ps1_json_fact5": null,
    "ps1_json_fact6": { "a": "b", "c": "d" }
}
'@
}

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
facter-3.12.2.cfacter.20181217 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.12.1.cfacter.20181031 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.11.6.cfacter.20181031 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.12.1.cfacter.20181023 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.11.5.cfacter.20181022 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.12.0.cfacter.20181004 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.12.0.cfacter.20181001 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.12.0.cfacter.20180918 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.11.4.cfacter.20180821 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.11.3.cfacter.20180716 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.11.2.cfacter.20180612 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.9.6.cfacter.20180612 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.11.2.cfacter.20180606 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.9.6.cfacter.20180606 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
facter-3.11.0.cfacter.20180319 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1
cfacter-3.11.0.rc.20180314 ext/facter/facter/lib/tests/fixtures/facts/external/windows/powershell/json.ps1