Just to add to this discussion for the benefit of others, I didn't find creating a json file in UTF-8 without the byte order manifest (BOM) to be that trivial to figure, but I'm not the PowerShell wizard that others are yet.
I did piece together tips on a few stack exchange threads and come up with the following 3 line to export the config.json from my script:
# convert the PowerShell hash table used in the script back to json format, correcting for PowerShell's love of overescaping characters and
# out of paranoia switching from CRLF to LF for EOL to match the template's original format
$configJsonText = (ConvertTo-Json $configJson | ForEach-Object { [System.Text.RegularExpressions.Regex]::Unescape($_) }) -replace "`r`n", "`n"
# Set the UTF8 encoding to not include the BOM
$utf8NoBOM = New-Object System.Text.UTF8Encoding $false
# Actually write the file
[System.IO.File]::WriteAllText($configJsonPath,$configJsonText,$utf8NoBOM)
In my case the cli installer was returning:
2019-01-18 19:49:02,995 - vCSACliInstallLogger - DEBUG - Task 'SyntaxValidationTask: Executing Template Syntax Validation task' execution failed because [Error: Redundant character. Cause: The character '}' on line 45 (character 1) is possibly redundant. ], possible resolution is [Consider removing the character '}'.]
VMware must have changed something in the JSON library they used then failed to test it with PowerShell based scripts. Either it's more strictly adhering to RFC 7159, or its just choking on the first line of the JSON and skipping it if it has a BOM in it. Based on the error complaining about an extra brace on the last line of the file I think the later is probably the change in behavior.