I have a PowerShell script that I use to deploy vCSA. It generates the JSON template file for the vcsa-deploy.exe to use as an answer file.
The JSON being produced has worked perfectly fine with the vcsa-deploy.exe file from vCSA 6.0 and 6.5 media.
I tried today with the latest 6.7 media from the VMware-VCSA-all-6.7.0-10244745.iso and the syntax validator is tripping up all over the place.
PowerShell by default escapes certain characters, such as the apostrophe, within a string value - it replaces it with a \u0027 - which is valid JSON. I know that the apostrophe does not need to be escaped since it is enclosed in double-quotes, but for some reason PowerShell decides to do it anyway. (I know how to make PowerShell not do that.) But the previous JSON syntax validator from 6.0 and 6.5 media had absolutely no issue with this escape sequence. The new syntax validator does not like the backslash and feels it should have been escaped itself.
The other issue - and the one way more pressing - is that the JSON validator for 6.7 keeps failing a completely valid JSON file. It is being rejected because of the last closing curly bracket:
Here is the error message:
====== [START] Start executing Task: To validate CLI options at 15:45:37 ======
Command line arguments verfied.
[SUCCEEDED] Successfully executed Task 'CLIOptionsValidationTask: Executing CLI
optionsValidation task' in TaskFlow 'template_validation' at 15:45:37
SyntaxValidationTask: Executing Template Syntax Validation task
[START] Start executing Task: To validate the syntax of the template. at 15:45:37
Template syntax validation failed for template
Error: Redundant character. Cause: The character '}' on line 45 (character 1) is
possibly redundant. Resolution: Consider removing the character '}'.
================ [FAILED] Task: SyntaxValidationTask: Executing Template Syntax
Validation task execution failed at 15:45:37 ================
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 '}'.]
The character the syntax validator is complaining about, is the very last curly bracket that needs to be there. I triple checked the JSON file to make sure I don't have an errand bracket, and it does not.
To me this sounds like the syntax validator has a bug. Does anyone have any insight?