Which JSON {key:value} pair is correctly formatted?

Question: Which JSON {key:value} pair is correctly formatted?

Explanation

{“property”: “email”, “value”: "[email protected]"} is correctly formatted because each key is a string enclosed in quotes, separated from its value by a colon, and pairs are separated by commas. This adheres to proper JSON syntax for API data exchange in HubSpot. Correctly formatted JSON ensures that API requests are parsed and processed without errors.

Why the other options are incorrect

{property; email; value; [email protected]} uses semicolons instead of colons and lacks quotes around keys, which is invalid JSON.

{“value”: “[email protected]”, “property”: “email”} has valid syntax but does not match the order required in the HubSpot API example for clarity.

{email value property “[email protected]”} is missing colons, commas, and quotes, making it invalid JSON.

Source for verification

https://developers.hubspot.com/docs/api/overview

The answer(s) to the question is highlighted in the BOLD text above. You can also find more questions and answers related to the exams on the "Data Integrations Certification" page.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top