CompTIA Cloud+ (CV0-004) — Question 99

A cloud engineer tries to deploy five new cloud instances using code. An error occurs, and the instances are not created. The configuration fails to run. The engineer then receives the following error message:

ERROR:Parse error on json line x in config

Given the following snippet from the config.json file:

{ "instance_count": 5,
"ssd_options" : ["100GB","200GB","300GB"],
"instance_region": apac,
"instance_code": 255,
"start_instance" : true
}

Which of the following oversights created the error in the configuration file?

Answer options

Correct answer: C

Explanation

The correct answer is C because the value for instance_region is not enclosed in quotes, which is required for string values in JSON. Options A and B are irrelevant as the instance_count and ssd_options are correctly formatted. Option D is incorrect because there is no requirement for a trailing comma after the last key-value pair.