SingleScripts/Read-JsonFile.ps1

[CmdletBinding()]
Param(
  [Parameter(Mandatory=$true,Position=1)] [string]$path
)
$file = Get-Item $path
[string]$plaintext = $file | Get-Content -Raw
  
$blockComments = "/\*(.*?)\*/"
$lineComments = "[^:]//[^\n\r]*[\n\r]?" 

$cleantext = [regex]::Replace($plaintext.ToString(), "$lineComments|$blockComments", "")

$json = $cleantext | ConvertFrom-Json

return $json