Failed to parse template: Error parsing JSON: invalid character 'ÿ' looking for beginning of value
Im getting this error, when I use
$Parsed_json | ConvertTo-Json -Depth 999 -Compress |
Out-File $nameOfJsonFile -Force
and this:
Failed to parse template: Error parsing JSON: invalid character 'ÿ' looking for beginning of value
when using
$Parsed_json | ConvertTo-Json -Depth 999 | Out-File $nameOfJsonFile -Force
The JSON online validator approves of my JSON.
My research so far about this topic, is that the Unicode characters that prints themselves when you use Out-File
, is creating this issue. The encoding of my JSON file is ASCII, any help regarding this issue, would be highly appreciated.