Which data is properly formatted with JSON?
A.
B.
C.
D.
Which data is properly formatted with JSON?
A.
B.
C.
D.
The correct answer is B. For data to be properly formatted in JSON, it must follow specific syntax rules. JSON objects must have keys enclosed in double quotes, string values must also be enclosed in double quotes, and each key-value pair must be separated by a comma except the last one. In option B, all keys and string values are enclosed in double quotes, and all key-value pairs are correctly followed by a comma except the last one, which adheres to JSON formatting rules. Therefore, option B is the correctly formatted JSON data.
B is correct as all must end with comma except the last statement before }
netpeer is correct. The question asks for correct json formatting. B is the only answer that has correct json formatting. The question around integer is irrelevant. If you put 25, it's an integer, if you put "25", it's a string. from a formatting perspective, both are correct.
A - syntax error - no commas at the end of the lines C - syntax error - "name" value Peter must be a type string (in quotas -> "Peter")
B is correct, checked in JSONLint validator numbers 18 and 25 can be in "" or not still valid.
To validate JSON { "name":"Peter", "age":"25", "likesJson":true, "characteristics":["small","strong","18"] }
B is correct, there is no need for a comma at end of the last statement
B is correct
technically B & D are both correct, I mean Python syntax will not raise any errors ...
A - syntax error - no commas at the end of the lines C - syntax error - "name" value Peter must be a type string (in quotas -> "Peter")
B is correct
B is correct
b is the right option
B is valid, verified with JsonValidator...
Correct answer should be D
the comma at the end makes the answer wrong.
should the age 25 be in quotation???
in quotation 25 is string, without 25 is integer.
No, because it has a final unneeded comma