Bird
0
0

Which of the following is the correct JSON syntax for an object with a key "name" and value "Alice"?

easy📝 Syntax Q12 of 15
Rest API - Request and Response Format
Which of the following is the correct JSON syntax for an object with a key "name" and value "Alice"?
A{"name" = "Alice"}
B{name: "Alice"}
C["name": "Alice"]
D{"name": "Alice"}
Step-by-Step Solution
Solution:
  1. Step 1: Recall JSON object syntax

    JSON objects use curly braces with keys and values as strings, keys must be in double quotes.
  2. Step 2: Check each option

    {"name": "Alice"} uses double quotes correctly around key and value, with colon separator.
  3. Final Answer:

    {"name": "Alice"} -> Option D
  4. Quick Check:

    Keys and strings in double quotes [OK]
Quick Trick: Keys and string values must be in double quotes [OK]
Common Mistakes:
MISTAKES
  • Omitting quotes around keys
  • Using square brackets for objects
  • Using equals sign instead of colon

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes