hard
Single Answer
0

Which statement best represents the following JSON data? { "ipaddress": [ "192.168.1.2", [ "192.168.1.4" ] ], "subnet_mask": "255.255.255.0", "defaultgw": "192.168.1.1" }

Answer Options

A

The interface data is incorrect because it is missing a comma after defaultgw.

B

The interface data is incorrect because it is missing a subnet mask for the second IP address.

C

The interface data is incorrect because it contains an illegal underscore character.

D

Nothing is wrong with the data.

Correct Answer: D

Explanation

Nothing is wrong with the JSON data. The IP address is defined as a collection of IP addresses using the JSON tag of ipaddress. Although for completeness a second subnet mask should be stated in the JSON data, it may be in the proper format that is expected. The last comma is not needed in JSON files, as it defines the end of the hierarchy. The underscore in a JSON key or value data is not considered an illegal character.

json
validation
nested-arrays
syntax