Functions/json.ps1
function Get-JsonFile( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string]$filePath) { if (!(Test-Path $filePath)) { Throw "file not found in path @ '$filePath'." } $result = (Get-Content $filePath) -join "`n" | ConvertFrom-Json return $result } |