[Enterprise SONiC] Verify JSON format of /etc/sonic/config_db.json in SONiC Follow
Example: Verify JSON format
Tested model & firmware version:
- Switch model name:
AS7326-56X
- Edgecore SONiC version:
202006.4
202012.2
202111.3
Command: sonic-cfggen
-j JSON : indicate json file name
--print-data : print all data
Restriction:
- "sonic-cfggen" is for JSON format verificaton only. It's NOT for parameters verification.
Example:
Wrong JSON format on the /etc/sonic/config_db.json
Note: wrong format with red print
Step 1. Use "sonic-cfggen" command to verify /etc/sonic/config_db.json
Note: Get error. It indicates which line of the file is incorrect.
Step 2. Refer to JSON format and correct the file.
Step 3. Use "sonic-cfggen" command to verify until no errors.
Comments
0 comments
Please sign in to leave a comment.