diff --git a/.gitignore b/.gitignore index b1efed7..c57dc06 100644 --- a/.gitignore +++ b/.gitignore @@ -399,3 +399,5 @@ FodyWeavers.xsd *.sln.iml *.sln + +testResults.xml diff --git a/src/public/Import-ConfigData.ps1 b/src/public/Import-ConfigData.ps1 index d9d7739..d750091 100644 --- a/src/public/Import-ConfigData.ps1 +++ b/src/public/Import-ConfigData.ps1 @@ -5,7 +5,7 @@ function Import-ConfigData { .DESCRIPTION Load configuration data from multiple file types. The returned object should look the same regardless of the source format. .PARAMETER Path - Specifies a path to a configuration file with an extention of psd1, toml, yaml, or yml. + Specifies a path to a configuration file with an extention of psd1, toml, json, yaml, or yml. .LINK https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_data_files?view=powershell-7.4 .LINK @@ -59,7 +59,7 @@ function Import-ConfigData { '.yml' { Import-YamlConfigData -Path $Path; break } '.json' { $content = Get-Content -Path $Path -Raw - $content | ConvertFrom-Json; break + $content | ConvertFrom-Json -AsHashtable; break } } } diff --git a/test/test3/TestConfig.json b/test/test3/TestConfig.json index 6d393d7..18fd875 100644 --- a/test/test3/TestConfig.json +++ b/test/test3/TestConfig.json @@ -1,5 +1,5 @@ { - "Plan": [ + "plan": [ { "timeout": "0:0:10", "headers": {